useEffectAfterMount
Runs an effect only after the component has mounted, skipping the very first
useApi
Performs an HTTP request and manages its loading, data, and error
useOutsideClick
Invokes a callback whenever a click or touch event occurs outside a given
useToggleState
Manages a boolean state with a single toggle function. A minimal, ergonomic
useControlledState
Implements the controlled/uncontrolled component pattern in a single hook.
usePersistedState
Behaves like useState, but automatically persists the value to
useDocVisible
Tracks whether the browser tab/document is currently visible to the user,
useMounted
Tracks whether a component is currently mounted, and optionally runs
useSequentialRequest
Wraps an async request function so that only the most recent call ever
useAutofillSubmit
Submits a form as soon as a password manager fills it, so choosing a saved
useLatest
Returns a stable ref that always holds the latest value, so long-lived
usePrevious
Returns the value from the previous render. It does not cause extra
useEventListener
Attaches a typed event listener to window, document, an element (or a ref
useThrottledValue
Returns a throttled copy of a value that updates at most once per interval.
useInterval
A declarative setInterval. It calls your callback every delay
useMediaQuery
Subscribes to a CSS media query and returns whether it currently matches. It
useClipboard
Copy text to the clipboard and get a temporary copied flag for "Copied!"
useCooldown
A one-second countdown for actions that must not be repeated straight away.
useDebouncedCallback
Returns a stable, debounced version of a callback, with cancel, flush and
useIsomorphicLayoutEffect
A drop-in replacement for useLayoutEffect that is safe in server-rendered
useStableCallback
Returns a function whose identity never changes but that always calls your
useTimeout
A declarative setTimeout. It calls your callback once after delay
useElementSize
Tracks the size of an element with a ResizeObserver and returns its width
useResizeObserver
Runs a callback whenever an element is resized, using a ResizeObserver. It
useIntersectionObserver
Tracks whether an element is visible in the viewport, or inside a scroll
useAsync
Runs any async function and tracks its status, data and error. You decide
useDebouncedValue
Returns a debounced copy of a value that only updates once the value has
useWebLock
Run async work under a named lock from the
useTabLeader
Elect one browser tab as the leader among all tabs of the same origin, so work
useRateLimitedCallback
Returns a stable function that runs a callback at most limit times per
useNow
Returns the current time in milliseconds and re-renders your component at a
useImpression
Calls your callback once an element has been at least a given share visible for
useIsStuck
Tells you whether a position: sticky element is currently stuck, so you can
useFrecency
Ranks items by how often and how recently they were used ("frecency"), and
useDebounce (deprecated)
useDebounce is deprecated and will be removed in a future release. It is now
useThrottle (deprecated)
useThrottle has been renamed to