Files
react/compiler/packages/babel-plugin-react-compiler
Joe Savona b687fd27b5 compiler: Use types to decide which scopes are eligible for merging
In MergeReactiveScopesThatInvalidateTogether when deciding which scopes were eligible for mergin at all, we looked specifically at the instructions whose lvalue produces the declaration. So if a scope declaration was `t0`, we'd love for the instruction where `t0` was the lvalue and look at the instruction type to decide if it is eligible for merging.

Here, we use the inferred type instead (now that the inferred types support the same set of types of instructions we looked at before). This allows us to find more cases where scopes can be merged.

ghstack-source-id: 0e3e05f24e
Pull Request resolved: https://github.com/facebook/react/pull/29157
2024-05-23 17:44:56 +01:00
..
2024-05-13 14:10:16 -07:00
2024-05-02 14:12:33 -07:00
2024-05-02 14:12:33 -07:00
2024-05-02 14:12:33 -07:00
2024-05-02 14:12:33 -07:00
2024-05-02 14:12:33 -07:00

babel-plugin-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.

This package contains the React Compiler Babel plugin use in projects that make use of Babel. You can find instructions for using this plugin here: https://react.dev/learn/react-compiler