# Hooks - **State** - [useBoolean](/use-boolean): Manages a boolean state with helper functions to set, reset, and toggle the value. - [useControllableState](/use-controllable-state): Manages state that can be either controlled externally or uncontrolled with an internal fallback. - [useCounter](/use-counter): Manages a numeric counter state with optional min/max clamping and helper methods. - [useHistoryState](/use-history-state): Manages state with undo/redo history tracking and configurable history capacity. - [useList](/use-list): Manages an array state with immutable helper methods for pushing, inserting, updating, removing, filtering, and sorting items. - [useMap](/use-map): Manages a reactive Map state with immutable helper actions for setting, deleting, clearing, and querying entries. - [usePagination](/use-pagination): Computes pagination state, page ranges with ellipsis markers, data slice indices, and navigation helpers. - [usePrevious](/use-previous): Returns the value passed on the previous render. - [usePreviousDistinct](/use-previous-distinct): Returns the most recent distinct value prior to the current value. - [useQueue](/use-queue): Manages a reactive FIFO (first-in, first-out) queue in React state. - [useSelection](/use-selection): Manages single or multi-item selection state with range selection and bulk toggle helpers. - [useSet](/use-set): Manages a reactive Set in React state with immutable update helpers. - [useToggle](/use-toggle): Manages a boolean state with a toggle function that also accepts an explicit boolean or DOM event. - **Effects** - [useAnimationFrame](/use-animation-frame): Runs a callback on every requestAnimationFrame tick with delta time tracking, FPS limiting, and playback controls. - [useCountdown](/use-countdown): Manages a configurable countdown (or count-up) timer with start, pause, and reset controls. - [useDebounceCallback](/use-debounce-callback): Creates a debounced version of a callback function with leading, trailing, maxWait, cancel, and flush support. - [useDebounceValue](/use-debounce-value): Debounces a reactive value and provides a debounced setter with .cancel(), .flush(), and .isPending() controls. - [useEventCallback](/use-event-callback): Returns a referentially stable callback that always invokes the latest version of fn. - [useFirstMountState](/use-first-mount-state): Returns true during the initial render of a component and false on all subsequent renders. - [useHydrated](/use-hydrated): Returns false during server-side rendering and initial hydration, and true once hydrated on the client. - [useInterval](/use-interval): Runs a callback repeatedly at a specified millisecond interval, pausing when delay is null. - [useIsomorphicLayoutEffect](/use-isomorphic-layout-effect): Uses useLayoutEffect in browser environments and falls back to useEffect during server-side rendering to avoid React SSR warnings. - [useLatest](/use-latest): Returns a ref object whose .current property is synchronously updated to the latest value after every render. - [useRafCallback](/use-raf-callback): Throttles a callback so it executes at most once per requestAnimationFrame with the latest arguments. - [useSpinDelay](/use-spin-delay): Prevents loading indicator flashes by delaying appearance and enforcing a minimum display duration. - [useThrottleCallback](/use-throttle-callback): Creates a throttled version of a callback that executes at most once every wait milliseconds. - [useThrottleValue](/use-throttle-value): Throttles state updates to a value so it changes at most once per wait milliseconds. - [useTimeout](/use-timeout): Declarative setTimeout hook that invokes a callback after delay milliseconds. - [useUnmount](/use-unmount): Executes a cleanup callback when the component unmounts, always using the latest function reference. - [useUnmountedRef](/use-unmounted-ref): Returns a read-only ref whose current value is true after the component has unmounted. - [useUpdateEffect](/use-update-effect): Runs a useEffect callback only on dependency updates, skipping the initial mount. - **DOM** - [useDocumentTitle](/use-document-title): Updates document.title reactively and optionally restores the original title on unmount. - [useDropZone](/use-drop-zone): Handles file drag-and-drop interactions with MIME/extension filtering via a target ref or getRootProps. - [useElementRef](/use-element-ref): Provides a callback ref and reactive state for the mounted DOM element so effects re-run when the node attaches or detaches. - [useElementScroll](/use-element-scroll): Tracks a scrollable element's scroll position, active scrolling state, movement directions, and edge arrival flags. - [useElementSize](/use-element-size): Tracks the width and height of a DOM element reactively using ResizeObserver. - [useEventListener](/use-event-listener): Attaches a type-safe event listener to Window, Document, HTMLElement, SVGElement, MediaQueryList, or custom EventTarget with automatic cleanup. - [useFocus](/use-focus): Tracks and controls the focus state of a target DOM element, with optional :focus-visible filtering. - [useFocusTrap](/use-focus-trap): Traps keyboard Tab / Shift+Tab focus within a container element and optionally restores focus on unmount. - [useInert](/use-inert): Manages the inert and aria-hidden attributes on a target element (or its document-level siblings) with reference counting. - [useInfiniteScroll](/use-infinite-scroll): Triggers an asynchronous onLoadMore callback when a sentinel element scrolls into view using IntersectionObserver. - [useIntersectionObserver](/use-intersection-observer): Observes changes in the intersection of a target DOM element with an ancestor element or the viewport. - [useLockBodyScroll](/use-lock-body-scroll): Locks scrolling on document.body (or a target element) with scrollbar gap compensation and reference counting across multiple active locks. - [useMeasure](/use-measure): Measures the dimensions and box insets of a DOM element via a callback ref and ResizeObserver. - [useMergeRefs](/use-merge-refs): Combines multiple React refs (callback refs, RefObjects, or null/undefined) into a single stable callback ref with React 19 cleanup support. - [useMutationObserver](/use-mutation-observer): Observes DOM tree, attribute, or character data mutations on a target node using MutationObserver. - [useOnClickOutside](/use-on-click-outside): Invokes a handler when a pointer, mouse, or touch interaction occurs outside one or more target elements (with Shadow DOM composedPath support). - [useResizeObserver](/use-resize-observer): Observes size changes on a target DOM element using the ResizeObserver API. - [useRovingTabIndex](/use-roving-tab-index): Implements the WAI-ARIA roving tabIndex keyboard navigation pattern for composite widgets. - [useScript](/use-script): Dynamically loads an external