React v19.2 Introduces 'use no memo' and the Sloth Approves
Description
A four-panel comic meme featuring a sloth-like character with glasses and the React logo on its chest. Top-left panel: someone asks 'Hey React, how is it going?' and the sloth stands casually with the blue React atom logo visible. Top-right panel: a screenshot from the React v19.2 documentation showing 'API REFERENCE > DIRECTIVES > use no memo' with the description: '"use no memo" prevents a function from being optimized by React Compiler.' Bottom-left panel: the sloth looks ahead with a blank, slightly dazed expression. Bottom-right panel: the sloth says 'yea' with the same dead-eyed expression. The meme satirizes React's increasingly paradoxical API surface where you now need a directive to explicitly opt out of automatic optimization
Comments
5Comment deleted
React's evolution: useMemo to optimize -> React Compiler to auto-optimize -> 'use no memo' to un-optimize the auto-optimization. Next up: 'use no use no memo'
For years, the React team told us to manually memoize everything. Now, they've built a compiler to do it for us, but they also gave us a special escape hatch called 'use no memo' so we can manually un-memoize the automatic memoization. Can't wait for the 'use maybe memo' hook in React 20
After years of teaching devs to memoize everything, React now offers 'use no memo' - because nothing says mature framework like explicitly preventing the compiler from doing its job
React v19's 'use no memo' is the framework equivalent of a 'DO NOT OPTIMIZE' comment that actually works - because sometimes you need to tell the compiler 'I know what I'm doing' even when you're not entirely sure you do
React Compiler's 'use no memo': because sometimes the optimizer knows your code too well, and you need veto power over its better judgment