Introduction
本文档内容仍处于实验阶段,内容会随着版本的迭代进行修改。您可随时在我们的工作组的讨论区发送反馈。 此外,本文档还包含了若干需手动配置的步骤,但这不代表新架构稳定版的最终开发体验。我们仍在开发相关的工具、模板和第三方库,帮助你更快地迁移到新架构上,而非从头开始配置环境。
Starting from version 0.68, React Native provides the New Architecture, which offers developers new capabilities for building highly performant and responsive apps. Visit Why a New Architecture to learn more about what drove the decision to re-architect, and the benefits it provides.
In order to achieve these benefits, we had to rethink how Native Modules and Native Components work. This led us to develop the Pillars of the New Architecture:
- TurboModules, a framework to support efficient and flexible integration with native code
- Fabric renderer and components, which offer improved capabilities, cross-platform consistency, and performance in rendering
- Codegen, which generates boilerplate C++ required by the New Architecture, via static typing in JavaScript
Get started with the New Architecture
For app developers
To create a new app using the New Architecture, head over to Creating a New Architecture App, which will get you up and running in a few quick steps with the new app template.
To migrate an existing app to the New Architecture, follow Adopting the New Architecture.
For library maintainers
First, read up on the core concepts outlined in the Pillars section.
Then, for a how-to guide on supporting the New Architecture, check out the Migration guide.
For information on supporting both the Old and New Architectures, see the Backwards Compatibility guide.