Commit Graph
3 Commits
Author SHA1 Message Date
OrcaWin a2d490700b build: enable React Compiler for the renderer and web build (#39811) 2026-11-08 19:41:47 -08:00
OrcaWinandOrcaWin bb368c3ae6 chore(ratchet): flag discarded subscriptions and store snapshots React Compiler would cache (#39630)
Two new React Compiler compat hazards:
- discarded-subscription: a useSyncExternalStore call whose result is thrown
  away, so the reads after it get cached on unrelated inputs.
- store-read-in-memo-block: a render-level getState() that the compiler places
  in a cache-guarded block. Reads inside the source's own useMemo or callbacks
  keep their written deps and are skipped.

The compiled output is parsed once for hook and store reads. Current sites are
grandfathered in the hazard baseline.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 16:45:10 -08:00
OrcaWinandOrcaWin 75910ba631 build(renderer): gate React Compiler compatibility with a ratchet (#39324)
Adds oxc-transform-react as a devDependency and a ratchet that runs React
Compiler in analysis mode over the shipped renderer sources. Files can't gain
bailouts (new files must compile fully), and new code the compiler would run
differently is banned: hooks it memoizes into a cached block, bare `void x;`
reads, member postfix updates used as values, and "use no memo" opt-outs.
Both baselines are generated by --update / --prune.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-07 00:42:01 -08:00