ReactUse
Introduction
ReactUse is a comprehensive collection of 100+ essential React Hooks for building modern React applications. Inspired by VueUse, it provides production-ready hooks for browser APIs, state management, sensors, animations, DOM elements, and more.
Features
π― 100+ Hooks β The most comprehensive React hooks collection
π¦ Tree-Shakable β Import only what you need
π· TypeScript β Full type definitions for every hook
π₯οΈ SSR Compatible β Works with Next.js, Remix, and more
π Well Documented β Interactive demos for every hook
π€ MCP Support β AI-powered hook discovery
Installation
npm i @reactuses/coreQuick Start
import { useToggle } from "@reactuses/core";
const Demo = () => {
const [on, toggle] = useToggle(true);
return <button onClick={toggle}>{on ? "ON" : "OFF"}</button>;
};Who's Using This
Hook Categories
useClipboard, useColorMode, useCookie, useDarkMode, useDocumentVisibility, useEyeDropper, useFavicon, useFileDialog, useFullscreen, useMediaDevices, useMediaQuery, useOnline, usePermission, usePlatform, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, useScreenSafeArea, useScriptTag, useTextDirection, useTitle, useWebNotification, useBroadcastChannel, useEventSource, useFetchEventSource, useGeolocation, useIdle, useKeyModifier, useMobileLandscape, useNetwork, useOrientation, usePageLeave, useSpeechRecognition, useWindowFocus, useWindowScroll, useWindowSize, and more...
useBoolean, useControlled, useCounter, useCycleList, useDebounce, useDebounceFn, useDisclosure, useLocalStorage, useMap, usePrevious, useSessionStorage, useSetState, useThrottle, useThrottleFn, useToggle, and more...
useClickOutside, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementSize, useElementVisibility, useFocus, useHover, useInfiniteScroll, useIntersectionObserver, useLongPress, useMeasure, useMouse, useMousePressed, useMutationObserver, useResizeObserver, useScroll, useScrollIntoView, and more...
useAsyncEffect, useCustomCompareEffect, useDeepCompareEffect, useEventListener, useInterval, useMount, useRafFn, useTimeout, useTimeoutFn, useUnmount, useUpdate, and more...
MCP Support
If you want to use the MCP (Model Context Protocol) integration with reactuse, you can easily set it up with the following configuration. This allows you to run the @reactuses/mcp utility via npx for enhanced command-line support and automation.
Add the following to your configuration:
"@reactuses/mcp": {
"command": "npx",
"args": ["-y", "@reactuses/mcp@latest"],
"type": "stdio"
}Documentation
π Full Documentation | π LLM-friendly Documentation | π¬ Discord | π Issues
Contribute
See the Contributing Guide
ChangeLog
See the ChangeLog
Thanks
This project is heavily inspired by the following awesome projects.
Sponsor Me
If my work has helped you, consider buying me a cup of coffee. Thank you very muchπ₯°!.
Maintenance
Tools
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/childrentime/reactuse'
If you have feedback or need assistance with the MCP directory API, please join our Discord server