NOTES
Notes & Nodes
Fragrance and Code, Simply Put
-
use() with Context : Conditional Context Reads in React 19
2 min read
Read context with the new use() hook, even inside conditions and loops.
Continue Reading -
Abandon Render Pattern : Track Previous Values Without usePrevious
2 min read
Update state during render when inputs change; React will abandon and restart the render.
Continue Reading -
Latest Ref Pattern : Access the Latest Value Without Re-running Effects
2 min read
Keep event handlers up to date using a ref instead of effect dependencies.
Continue Reading -
useImperativeHandle : Expose Methods from Child to Parent
2 min read
When refs aren’t enough, selectively expose imperative methods from a child component.
Continue Reading -
Context Selector : Subscribe to Just What You Need
2 min read
Use use-context-selector to avoid re-renders by selecting slices of context.
Continue Reading