react/compiler
Joseph Savona 2710795a1e
[compiler] Cleanup for @enablePreserveExistingMemoizationGuarantees (#34346)
I tried turning on `@enablePreserveExistingMemoizationGuarantees` by
default and cleaned up a couple small things:

* We emit freeze calls for StartMemoize deps but these had
ValueReason.Other so the message wasn't great. We now treat these like
other hook arguments.
* PruneNonEscapingScopes was being too aggressive in this mode and
memoizing even loads of globals. Switching to
MemoizationLevel.Conditional ensures we build a graph that connects
through to primitive-returning function calls, but doesn't unnecessarily
force memoization otherwise.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34346).
* #34347
* __->__ #34346
2025-09-03 21:30:52 -07:00
..
apps/playground [playground] Upgrade to latest next (#34375) 2025-09-03 13:47:37 -04:00
docs Update DEVELOPMENT_GUIDE.md (#32281) 2025-03-13 11:45:26 -04:00
fixtures
packages [compiler] Cleanup for @enablePreserveExistingMemoizationGuarantees (#34346) 2025-09-03 21:30:52 -07:00
scripts [compiler] Script to produce markdown of lint rule docs (#34260) 2025-08-22 09:59:28 -07:00
.eslintrc.js
.gitignore Remove leftover Rust script (#33314) 2025-05-20 12:20:51 -04:00
CHANGELOG.md [compiler] Update changelog for 19.1.0-rc.2 (#33207) 2025-05-15 10:34:11 -04:00
package.json [compiler] Script to produce markdown of lint rule docs (#34260) 2025-08-22 09:59:28 -07:00
README.md
yarn.lock [compiler] Aggregate error reporting, separate eslint rules (#34176) 2025-08-21 14:53:34 -07:00

React Compiler

React Compiler is a compiler that optimizes React applications, ensuring that only the minimal parts of components and hooks will re-render when state changes. The compiler also validates that components and hooks follow the Rules of React.

More information about the design and architecture of the compiler are covered in the Design Goals.

More information about developing the compiler itself is covered in the Development Guide.