mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Update Zod function schemas to use v4 API syntax: - Replace z.function().args(z.string()) with z.function(z.tuple([z.string()]), z.any()) - Update moduleTypeProvider and flowTypeProvider in Environment.ts - Allow both Zod v3 and v4 in package dependencies (^3.22.4 || ^4.0.0) This fixes the crash when users have Zod v4 installed, where the .args() method no longer exists. The new API is compatible with both Zod v3.23+ and v4.x. Fixes TypeError: zod.z.function(...).args is not a function
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