The Archives
THE LIBRARY
OF SCROLLS
Tactical mental models for modern React. Master the friction of the digital artifact without losing your mind in the render loop.
Featured Scroll
React.memo Is Not Working - How to Actually Stop Re-renders
memo checks one thing: same reference as last time? Inline objects and functions are never the same reference twice. So memo always says no - and the child always re-renders.
BUG PATTERNWhite Belt
React State Is Not Updating After Your Click - Here Is Why
Your mutation succeeded. The data is correct in memory. React just never knew. It checked the reference, found the same address as before, and decided nothing had changed. That is the whole bug.
BUG PATTERNBlue Belt
useCallback Always Returns the Wrong Value - Fix Stale Closures
useCallback keeps your function alive across renders. The side effect: that function is frozen at the moment it was born. The user typed something new. Your handler does not know.