7 min read
React Compiler Internals: How Auto-Memoisation Works, and Where It Gives Up
The compiler does not memoise your components by wrapping them in `memo`. It rewrites them into a cache-slot machine, and it does it only when it can prove your code follows the rules. Here is the proof it needs, and what breaks it.