mirror of
https://github.com/react/react.git
synced 2026-09-28 21:25:11 +08:00
## Summary - support prefix and postfix update expressions on captured variables in both TypeScript and Rust compiler backends - represent updates with explicit `PrefixUpdateLocal`, `PrefixUpdateContext`, `PostfixUpdateLocal`, and `PostfixUpdateContext` HIR variants - model captured updates as mutations so SSA, effect inference, dead-code elimination, and post-render validation preserve their semantics - convert the existing TODO fixtures to passing coverage and add the Airwave-shaped map regression from T286959188 - correct Rust workspace manifest paths in the rust-port documentation ## How did you test this change? - `yarn prettier` - `yarn linc` - `yarn flow dom-node` - `yarn test --silent --no-watchman React-hooks-arity` - `yarn test-www --silent --no-watchman useMemoCache` - `yarn test-www --variant=false --silent --no-watchman useMemoCache` - `node_modules/.bin/tsc --noEmit -p compiler/packages/babel-plugin-react-compiler/tsconfig.json` - `cargo +1.93.1 fmt --manifest-path compiler/Cargo.toml --all -- --check` - `cargo +1.93.1 check --manifest-path compiler/Cargo.toml -p react_compiler -j 1` - targeted Cargo tests for lowering, SSA, inference, optimization, and validation - TypeScript and Rust snapshot runs for `*update-expression*` (11 tests each)
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.
Instructions for publishing the Rust compiler crates are covered in Publishing Rust Compiler Crates.