
React 官方中文文档
React is the library for web and native user interfaces. Build user interfaces out of individual pieces called components written in JavaScript. React is designed to let you seamlessly …
panicThreshold – React 中文文档
panicThreshold Determines whether compilation errors should fail the build or skip optimization.
gating – React 中文文档
The gating option enables conditional compilation, allowing you to control when optimized code is used at runtime.
Compiling Libraries – React 中文文档
This guide helps library authors understand how to use React Compiler to ship optimized library code to their users.
Configuration – React 中文文档
Compilation Control These options control what the compiler optimizes and how it selects components and hooks to compile. compilationMode controls the strategy for selecting …
Incremental Adoption – React 中文文档
Why Incremental Adoption? React Compiler is designed to optimize your entire codebase automatically, but you don’t have to adopt it all at once. Incremental adoption gives you control …
Introduction – React 中文文档
React Compiler is a new build-time tool that automatically optimizes your React app. It works with plain JavaScript, and understands the Rules of React, so you don’t need to rewrite any code to …
'use memo' directive – React 中文文档
注意 In most cases, you don’t need "use memo". It’s primarily needed in annotation mode where you must explicitly mark functions for optimization. In infer mode, the compiler automatically …
'use no memo' directive – React 中文文档
"use no memo" Add "use no memo" at the beginning of a function to prevent React Compiler optimization.
Installation – React 中文文档
Prerequisites React Compiler is designed to work best with React 19, but it also supports React 17 and 18. Learn more about React version compatibility.