2 min read
useEffectEvent : Read Latest Values in Effects Without Re-running Them
Extract non-reactive logic from effects so you control when they re-run.
Continue readingTopic
14 posts exploring hook patterns.
2 min read
Extract non-reactive logic from effects so you control when they re-run.
Continue reading2 min read
Pass a promise to use() and let Suspense handle loading and rendering.
Continue reading2 min read
Read context with the new use() hook, even inside conditions and loops.
Continue reading2 min read
Update state during render when inputs change; React will abandon and restart the render.
Continue reading2 min read
Keep event handlers up to date using a ref instead of effect dependencies.
Continue reading2 min read
When refs aren’t enough, selectively expose imperative methods from a child component.
Continue reading2 min read
Use use-context-selector to avoid re-renders by selecting slices of context.
Continue reading2 min read
Combine focused hooks to keep complex logic clean, testable, and reusable.
Continue reading2 min read
Use a ref to run logic only on the first render without effects.
Continue reading2 min read
Split effects so each handles a single job with its own dependencies.
Continue reading2 min read
Mark updates as non‑urgent so React can keep typing and clicks responsive.
Continue reading2 min read
Defer updating slow results so typing stays responsive.
Continue reading2 min read
Delay expensive work (like search) until input settles using a simple debounced hook.
Continue reading2 min read
Remove unnecessary state and effects by deriving values from existing state.
Continue reading