Skip to content
chornous.dev

Type two or more letters. Esc closes.

Index of sheets
Theme

Sheet 03 · Writing

All notes

React Compiler 1.0: roll it out like a migration

React Compiler is stable. Fix Rules of React violations first, then enable it in measured slices.

Pl. 96 · tree drawing generated from the slug “react-compiler-1-adoption-plan”

React Compiler 1.0 is stable, and I'd still roll it out in slices. The compiler removes a lot of manual memoization work, and it also surfaces Rules of React violations your code got away with before.

In a production app I'd start with linting. Upgrade the hooks lint setup, fix the diagnostics that point at unsafe render or effect behavior, and only then enable the compiler on a measured slice. Treat the compiled output as a performance layer. Your app's behavior shouldn't depend on it.

Good first candidates have heavy derived values, frequent re-renders, and enough test coverage to catch effect timing mistakes. Bad candidates have hidden mutation, broad context churn, or hand-rolled subscription logic that the whole team avoids touching.

Migration checklist:

  • Pin the compiler version during rollout.
  • Keep existing memoization until measurements say you can drop it.
  • Add interaction-level tests around the first compiled flows.
  • Measure render cost before you call it a win.

The compiler works best on plain React code, so clean up the exceptions first.

Volodymyr Chornous