-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the official documentation wiki for react-hook-lab — a robust, strictly-typed, and lightweight collection of reusable React hooks.
This Wiki is designed to provide in-depth documentation, architecture overviews, and advanced usage patterns that go beyond the quick-start instructions in the main README.
React Hook Lab is built on three core pillars:
- Zero Bloat: It has zero external dependencies (except for React). You can import exactly what you need, and the rest is tree-shaken away.
- Strictly Typed: Written entirely in TypeScript with precise generic types to catch errors at compile-time.
- SSR Ready: Built with Next.js and Remix in mind. Hooks that interact with browser APIs gracefully degrade on the server to prevent hydration mismatches.
We categorize our hooks into three main areas:
Debounce rapid state changes, throttle expensive computations, manage asynchronous API calls, and handle complex timeouts safely without worrying about stale closures.
-
useAsync,useDebounce,useInterval,useTimeout, etc.
Interact with the user's browser securely and natively. Access the clipboard, track online status, request microphone/camera access, observe element intersections, and download files.
-
useClipboard,useOnlineStatus,useCamera,useIntersectionObserver,useURL,useFullscreen, etc.
Sync state across browser tabs, persist data to localStorage, manage complex booleans/counters, and deeply clone objects while preserving stable references.
-
useSharedState,useLocalStorage,useDeepClone,useDeepMemo, etc.
Stop guessing why your components are re-rendering.
useRenderReason
Ready to dive in? Check out the Getting Started page to begin!
Built with ❤️ by Saurav-TB-Pandey. | Report an Issue | NPM