What is this?
react-use is a large collection of reusable React Hooks covering sensors, UI interactions, animations, side-effects, lifecycles, and state management.
Is it a framework or a library?
It's a library of standalone hooks you import individually into your existing React app, not a framework.
How do I add it to a project?
Install it with npm or yarn, then import the specific hooks you need, e.g. `import {useToggle} from 'react-use'`.
Do I need anything beyond React itself?
It's built on top of React Hooks, so you need a React version that supports hooks; some individual hooks pull in small helper packages like js-cookie or screenfull internally.
Do all these hooks work the same in server-side rendering?
Not necessarily — the library ships useIsomorphicLayoutEffect specifically because useLayoutEffect behaves differently on the server, and there's a dedicated SSR test config.
How many hooks does this provide roughly?
Dozens, grouped into categories like Sensors, UI, Animations, Side-effects, Lifecycles, State, and Miscellaneous — covering things like battery status, geolocation, mouse position, clipboard, cookies, local/session storage, and more.
Can I share state between components with these hooks?
Yes, createGlobalState, createReducerContext, and createStateContext are included specifically for sharing state across components.
Is there a live demo for each hook?
Most hooks include an inline demo GIF/image in the README showing the hook in action.
Are there translations of the documentation?
Yes, the README mentions ports/translations are available in addition to the English version.
What are similar projects?
nuqs, ultrastorage, formik, hooks, react-hook-form, downshift, Libraries.dev, usehooks
Which topics is it in?
react-hooks, localstorage, clipboard, hooks, state-management, npm-package, animation, ui, react, frontend, library, typescript