69+
React hooks
React Utility Library
Reactilities delivers 52+ hooks, lifecycle helpers, utility functions, and TypeScript types to speed up development without sacrificing quality. SSR safe. Tree-shakable. Zero runtime dependencies (besides React).
69+
React hooks
99%+
Test coverage
0
Runtime deps
TS First
Full typings
Quick Start
npm install reactilitiesWhy Reactilities
DOM hooks, state hooks, async utilities, lifecycle helpers, and utility types in one package.
Hooks guard browser-only APIs to avoid server-side rendering crashes and hydration mismatches.
Strong types, generics, and IntelliSense make integrations predictable in strict mode projects.
Import exactly what you need and keep bundle size under control.
99%+ coverage reduce regression risk and increase confidence in production.
Only React peer dependencies, no extra runtime baggage.
Live Playground
These examples run with reactilities imported from dependencies, so visitors can feel real behavior before reading the docs.
Interactive demos are loading on the client.
API Explorer
78 entries
Monitor battery level and charging status
Read docs →Detect clicks outside an element
Read docs →Dark mode with system preference detection and persistence
Read docs →Dynamically update the document title
Read docs →Add event listeners with automatic cleanup
Read docs →Dynamically update the website favicon
Read docs →Trap keyboard focus within a container
Read docs →Enter, exit, and track fullscreen state
Read docs →Detect hover state on any element
Read docs →Prevent body scrolling for modals and overlays
Read docs →Detect long press and hold interactions
Read docs →Responsive behavior with CSS media queries
Read docs →Track real-time cursor position
Read docs →Track portrait/landscape device orientation
Read docs →Detect when the browser tab is hidden or visible
Read docs →Create a portal root mounted to document.body
Read docs →Observe element size changes
Read docs →Accessible keyboard navigation for item groups
Read docs →Track window scroll coordinates
Read docs →Programmatic scrolling helpers for page and elements
Read docs →Track browser window dimensions
Read docs →Boolean state with setTrue and setFalse helpers
Read docs →Read and write clipboard content with status helpers
Read docs →Read and write browser cookies
Read docs →Copy text to clipboard with fallback
Read docs →Numeric counter with min/max bounds and step
Read docs →Manage array state with rich helper actions
Read docs →Persist state in localStorage with sync
Read docs →Manage Map state with React integration
Read docs →Manage object state with partial updates
Read docs →Access previous render value
Read docs →Persist state in sessionStorage
Read docs →Manage Set state with React integration
Read docs →Navigate bounded multi-step flows
Read docs →Toggle boolean state with flexible API
Read docs →State with undo and redo history
Read docs →Manage async operations with loading and error state
Read docs →Auto-save changing data with status tracking
Read docs →Countdown or count-up timer with controls
Read docs →Debounce rapidly changing values
Read docs →Debounce callback execution
Read docs →File drag-and-drop handling with validation
Read docs →Manage server-sent events (SSE) streams
Read docs →Data fetching with automatic abort support
Read docs →Read files as text, data URL, or ArrayBuffer
Read docs →Access user geolocation
Read docs →Detect user inactivity with timeout callbacks
Read docs →Lazy-load images when they enter viewport
Read docs →Infinite scrolling with IntersectionObserver
Read docs →Guard async updates against unmounted components
Read docs →Detect element visibility
Read docs →Run callback on a fixed interval
Read docs →Handle keyboard shortcuts
Read docs →Log component lifecycle and prop changes
Read docs →Monitor network connectivity
Read docs →Query browser permission status reactively
Read docs →Capture voice input with Web Speech API
Read docs →Text-to-speech controls with voice selection
Read docs →Throttle rapidly changing values
Read docs →Throttle callback execution
Read docs →Run callback after delay with reset and clear
Read docs →Virtualize large lists for performance
Read docs →Manage WebSocket connections
Read docs →Debug unnecessary re-renders in development
Read docs →Run heavy logic in a Web Worker
Read docs →Run function after component mounts
Read docs →Run function after every render
Read docs →Run function before first render
Read docs →Run cleanup before unmount
Read docs →SSR-safe drop-in for useLayoutEffect
Read docs →useEffect variant that skips first render
Read docs →Conditionally join CSS class names
Read docs →Dynamically load external scripts
Read docs →Make a type nullable: T | null
Read docs →Make a type nullable and undefined
Read docs →Extract all possible values from an object
Read docs →Recursively make all properties optional
Read docs →Type for void-returning typed functions
Read docs →SEO Index
Full text index for search engines and quick scanning by developers.
useBattery, useClickOutside, useDarkMode, useDocumentTitle, useEventListener, useFavicon, useFocusTrap, useFullscreen, useHover, useLockBodyScroll, useLongPress, useMediaQuery, useMousePosition, useOrientation, usePageVisibility, usePortal, useResizeObserver, useRovingTabIndex, useScrollPosition, useScrollTo, useWindowSize
useBoolean, useClipboard, useCookie, useCopyToClipboard, useCounter, useList, useLocalStorage, useMap, useObjectState, usePrevious, useSessionStorage, useSet, useStep, useToggle, useUndoRedo
useAsync, useAutoSave, useCountdown, useDebounce, useDebounceCallback, useDragAndDrop, useEventSource, useFetch, useFileReader, useGeolocation, useIdleTimeout, useImageLazyLoad, useInfiniteScroll, useIntersectionObserver, useInterval, useIsMounted, useKeyboardShortcuts, useLogger, useNetworkState, usePermission, useSpeechRecognition, useSpeechSynthesis, useThrottle, useThrottleCallback, useTimeout, useVirtualization, useWebSocket, useWhyDidYouRender, useWorker
componentDidMount, componentDidUpdate, componentWillMount, componentWillUnmount, useIsomorphicLayoutEffect, useUpdateEffect
classnames, loadScript
Nullable<T>, Maybe<T>, ValueOf<T>, DeepPartial<T>, VoidFunction<T>
FAQ
Yes. Hooks are implemented with SSR guards for browser APIs to avoid runtime crashes during server rendering.
Yes. The package is TypeScript-first and ships with complete type definitions, including utility generic types.
Yes. Reactilities is tree-shakable, so modern bundlers remove unused exports.