React hooks, explained properly
Deep dives into the problems that come up once you move past useState: hydration mismatches, stale closures, rate limiting and the patterns that make custom hooks maintainable. Every guide is written against real code, not toy examples.
The React Hooks Cheat Sheet
A complete reference to every built-in React hook and the 44 custom hooks in @danixsoft/hooks — what each one does, when to reach for it, and the mistake people make with it.
SSR-safe hooks in Next.js
Why "window is not defined" and hydration mismatches happen, and the four patterns that fix them for good in Next.js, Remix and any server-rendered React app.
Debounce vs throttle in React
The practical difference between debouncing and throttling, with React examples for search inputs, scroll handlers, autosave and resize listeners.
localStorage in React, done properly
Persisting React state to localStorage without hydration errors, cross-tab desync, quota crashes or JSON parse failures — with a production-ready hook.
Writing custom hooks that survive production
Naming, return shapes, dependency arrays, cleanup, testing and TypeScript patterns for custom React hooks that other people have to maintain.
Stale closures, and how to stop them
Why your setInterval logs the same number forever, why your event handler sees old state, and the three patterns that fix it permanently.
Comparing hook libraries?
We keep honest comparisons against usehooks-ts, react-use, ahooks and @mantine/hooks — including when the other library is the better choice.
Read the comparisons