React Use delivers production-ready hooks that solve real-world problems. Built with TypeScript-first approach, SSR compatibility, and tree-shaking optimization - everything you need to build modern React applications. Improve your react applications with our library 📦 designed for comfort and speed.
Visit https://siberiacancode.github.io/reactuse to view the full documentation.
npm install @siberiacancode/reactuse
import { useCounter } from "@siberiacancode/reactuse";
function App() {
const counter = useCounter(0);
return (
<div>
<h1>Count: {counter.value}</h1>
<button onClick={() => counter.inc()}>+1</button>
<button onClick={() => counter.dec()}>-1</button>
</div>
);
}
Use the CLI to add hooks to your project with useverse.
npx useverse@latest init
npx useverse@latest add [hook]
You will be presented with a list of hooks to choose from:
Which hooks would you like to add? › Space to select. A to toggle all.
Enter to submit.
â—¯ useActiveElement
â—¯ useAsync
â—¯ useBattery
â—¯ useBluetooth
â—¯ useBoolean
â—¯ useBreakpoints
â—¯ useBrowserLanguage
â—¯ useClickOutside
â—¯ useClipboard
â—¯ useConst