react/compiler
mofeiZ 89e8875ec4
[compiler] Fallback for inferred effect dependencies (#32984)
When effect dependencies cannot be inferred due to memoization-related
bailouts or unexpected mutable ranges (which currently often have to do
with writes to refs), fall back to traversing the effect lambda itself.

This fallback uses the same logic as PropagateScopeDependencies:
1. Collect a sidemap of loads and property loads
2. Find hoistable accesses from the control flow graph. Note that here,
we currently take into account the mutable ranges of instructions (see
`mutate-after-useeffect-granular-access` fixture)
3. Collect the set of property paths accessed by the effect
4. Merge to get the set of minimal dependencies
2025-04-25 15:44:39 -04:00
..
apps/playground [chore] Update caniuse-lite (#33013) 2025-04-24 13:50:03 -04:00
docs Update DEVELOPMENT_GUIDE.md (#32281) 2025-03-13 11:45:26 -04:00
fixtures [cleanup] Remove compiler runtime-compat fixture library (#31430) 2024-11-05 14:14:39 -05:00
packages [compiler] Fallback for inferred effect dependencies (#32984) 2025-04-25 15:44:39 -04:00
scripts [compiler] Add missing copyrights (#33004) 2025-04-23 22:04:44 -04:00
.eslintrc.js [compiler:codegen] Wrap non-ascii characters in JsxExpressionContainer 2024-06-21 10:08:15 -04:00
.gitignore [forgive] Init (#31918) 2025-02-25 12:19:11 -05:00
CHANGELOG.md [compiler] Add changelog (#32983) 2025-04-24 16:20:02 -04:00
package.json [compiler] Update rimraf (#32868) 2025-04-14 15:15:14 -04:00
README.md Update readme and other docs 2024-05-06 14:53:47 -07:00
yarn.lock [mcp] Convert docs resource to tool (#33009) 2025-04-24 14:57:44 -04: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.