Files
react/compiler/packages/babel-plugin-react-compiler
Joe Savona aa0930452b compiler: Represent pruned scopes instead of inlining
There are a few places where we want to check whether a value actually got memoized, and we currently have to infer this based on values that "should" have a scope and whether a corresponding scope actually exists. This PR adds a new ReactiveStatement variant to model a reactive scope block that was pruned for some reason, and updates all the passes that prune scopes to instead produce this new variant.

ghstack-source-id: aea6dab469
Pull Request resolved: https://github.com/facebook/react/pull/29781
2024-06-10 08:42:06 -07:00
..
2024-05-29 11:46:27 +09: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