Use to execute a callback before the initial render
Synchronous hook that runs before the initial render and never again.
Synchronous hook that runs before the initial render and never again.
Allows implementing mount and unmount hooks whose callbacks will be executed only once. Useful in order to prevent React.StrictMode double effect execution between rendering.
Returns MutableRefObject<boolean> with value true if the component is rendered in the DOM.
Wrapper over useLayoutEffect with 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Wrapper over useLayoutEffect with the difference that it is executed only once. The hook allows 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Wrapper over useEffect with an empty array as a dependency list.
Wrapper over useEffect cleanup function with an empty array as a dependency list.
Wrapper over useEffect with 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Wrapper over useEffect with the difference that it is executed only once. The hook allows 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Runs a callback when there is an update. Does not rely on effect. The hook allows 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Wrapper over useCallback which returns a debounced function. The diffing is based on 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Wrapper over useCallback which returns a debounced async function. The diffing is based on 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Wrapper over useCallback with 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Builds a className string from an array of classNames including conditional ones. The conditions are based on dependency values.
Builds a dependency list using memoization based on 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Wrapper over useMemo with 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Adds keyboard event listeners to the document.
Creates a MutationObserver instance for observing certain DOM tree. Receives a callback function which is executed on every mutation and a configuration for Mutation observation.
Runs a callback when there is a click outside a target HTML Element.
Creates a ResizeObserver instance for observing dimensions changes of a certain Element. Receives a callback function which is executed on every change.
Runs a debounced callback on window "resize" event
Builds a Context API value of state and actions using React useReducer hook.
Returns the last different value. If there are no value updates the last different value is undefined. The diffing is based on 3 comparison options - default React, default comparator (using dequal) or custom comparator.
Creates and returns a MutableRefObject based on value updates. The hook allows 3 comparison options - default React, default comparator (using dequal) or custom comparator.