React 编译器

简介

¥Introduction

了解 React Compiler 的功能 以及它如何通过为你处理 memoization 来自动优化你的 React 应用,从而无需手动执行 useMemouseCallbackReact.memo

¥Learn what React Compiler does and how it automatically optimizes your React application by handling memoization for you, eliminating the need for manual useMemo, useCallback, and React.memo.

安装

¥Installation

开始使用 安装 React Compiler 并学习如何使用构建工具对其进行配置。

¥Get started with installing React Compiler and learn how to configure it with your build tools.

增量采用

¥Incremental Adoption

如果你还没有准备好在所有地方启用它,请先在现有代码库中学习 逐步采用 React Compiler 的策略

¥Learn strategies for gradually adopting React Compiler in your existing codebase if you’re not ready to enable it everywhere yet.

调试和故障排除

¥Debugging and Troubleshooting

当事情没有按预期进行时,请使用我们的 调试指南 来了解编译器错误和运行时问题之间的区别,识别常见的中断模式,并遵循系统的调试工作流程。

¥When things don’t work as expected, use our debugging guide to understand the difference between compiler errors and runtime issues, identify common breaking patterns, and follow a systematic debugging workflow.

配置和引用

¥Configuration and Reference

有关详细的配置选项和 API 参考:

¥For detailed configuration options and API reference:

其他资源

¥Additional resources

除了这些文档之外,我们建议检查 React 编译器工作组 以获取有关编译器的其他信息和讨论。

¥In addition to these docs, we recommend checking the React Compiler Working Group for additional information and discussion about the compiler.