react/compiler/packages/babel-plugin-react-compiler
Joseph Savona e096403c59
[compiler] Infer types for properties after holes in array patterns (#34847)
In InferTypes when we infer types for properties during destructuring,
we were breaking out of the loop when we encounter a hole in the array.
Instead we should just skip that element and continue inferring later
properties.

Closes #34748

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34847).
* #34855
* __->__ #34847
2025-10-15 09:45:06 -07:00
..
scripts
src [compiler] Infer types for properties after holes in array patterns (#34847) 2025-10-15 09:45:06 -07:00
jest.config.js
package.json [compiler] Update for Zod v3/v4 compatibility (#34717) 2025-10-03 10:08:20 -07:00
README.md
tsconfig.json [compiler] Don't leak global __DEV__ type (#34551) 2025-09-22 16:51:57 +02:00
tsup.config.ts [compiler] Add missing copyrights (#33004) 2025-04-23 22:04:44 -04: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