RReactUseinreactuse.hashnode.dev·21h ago · 13 min readReact useSessionStorage Hook: Per-Tab State That Survives Reloads (2026)React useSessionStorage Hook: Per-Tab State That Survives Reloads (2026) Here's a checkout flow that loses the customer at step three: function Checkout() { const [step, setStep] = useState(0); co00
RReactUseinreactuse.hashnode.dev·1d ago · 12 min readReact useLatest Hook: Read Fresh State in Async Callbacks (2026)React useLatest Hook: Read Fresh State in Async Callbacks (2026) Here's an autosave button that lies to the user: function Editor({ docId }: { docId: string }) { const [text, setText] = useState("")00
RReactUseinreactuse.hashnode.dev·2d ago · 11 min readReact useInterval Hook: setInterval Without Stale Closures (2026)React useInterval Hook: setInterval Without Stale Closures (2026) Every React developer writes this component once, and it never does what they expect: function Counter() { const [count, setCount] =00
RReactUseinreactuse.hashnode.dev·3d ago · 9 min readReact useFocus Hook: Track & Control Element Focus State (2026)Focus is where interaction actually happens — the input receiving keystrokes, the button the keyboard user just tabbed to. Yet React gives you no state for it. document.activeElement knows the answer 00
RReactUseinreactuse.hashnode.dev·4d ago · 9 min readReact useElementSize Hook: Track Element Width & Height with ResizeObserver (2026)React useElementSize Hook: Track Element Width & Height with ResizeObserver (2026) Media queries answer one question: how big is the viewport? But your components don't live in the viewport — they liv00