@dxos/react-ui
    Preparing search index...

    Variable useOnTransitionConst

    useOnTransition: <T>(
        currentValue: T,
        fromValue: T | ((value: T) => boolean),
        toValue: T | ((value: T) => boolean),
        callback: () => void,
    ) => void

    Executes a callback function when a specified transition occurs in a value.

    This function utilizes the useDidTransition hook to monitor changes in currentValue. When currentValue transitions from fromValue to toValue, the provided callback function is executed.

    Type declaration

      • <T>(
            currentValue: T,
            fromValue: T | ((value: T) => boolean),
            toValue: T | ((value: T) => boolean),
            callback: () => void,
        ): void
      • Type Parameters

        • T

        Parameters

        • currentValue: T
        • fromValue: T | ((value: T) => boolean)
        • toValue: T | ((value: T) => boolean)
        • callback: () => void

        Returns void