Skip to content

Commit 5ea0998

Browse files
committed
Update 向后兼容
1 parent a7de228 commit 5ea0998

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
22
id: backward-compatibility
3-
title: What Backward Compatibility Is
3+
title: 向后兼容的意义
44
---
55

66
import NewArchitectureWarning from '../\_markdown-new-architecture-warning.mdx';
77

88
<NewArchitectureWarning/>
99

10-
Creating a backward compatible module is important to provide a library that works in both the **Old Architecture** and the **New Architecture**. Not all the users of your library will immediately jump on the New Architecture ship: it is a good thing that they will be able to use your library even if they are still using the old architecture.
10+
创建一个向后兼容的模块很重要,这样可以实现在**旧架构****新架构**中都能工作的库。并不是所有用户都会立刻转到新架构,最好在他们使用旧架构时仍然保持兼容。
1111

12-
The trick to create a good backward compatible module is to minimize the changes required to adopt the new version. In that way, users of the module can smoothly move to the new version and migrate to the New Architecture when they are ready, ideally by issueing one different command.
12+
创建一个良好的向后兼容模块的要点是尽可能减少迁移到新版本所需的更改。这样用户就可以平稳地转到新版本,并在准备好时迁移到新架构,理想情况下最好只用输入一行不同的命令。
1313

14-
To achieve this result, we have to perform few changes in our **TurboModule** and **Fabric Component** configurations. The steps we have to follow are:
14+
为了实现这一结果,我们必须对**TurboModule****Fabric Component**的配置进行几次更改。下面是需要的步骤:
1515

16-
1. **Update the installation configuration** to avoid using code that is not needed by the Old Architecture.
17-
1. **Update the code** to support both architectures. Both Android and iOS build pipelines gives you mechanism to provide a library that will compile with the correct React Native Architecture.
18-
1. **Configure the specs to load the proper implementation**, so that the JavaScript layer leverages the New Architecture whan it is available.
16+
1. **更新安装配置**,以避免使用旧架构不需要的代码。
17+
2. **更新代码**,以支持两个架构。Android iOS 构建流水线都提供了一种方法,使得库能够与正确的 React Native 架构一起编译。
18+
3. **配置加载正确实现的规范**,以便 JavaScript 层在可用时利用新架构。
1919

2020
:::info
21-
The next sections requires that you are familiar with the [Pillars](pillars) of the **New Architecture**.
21+
接下来的部分要求您熟悉**新架构**[支柱](pillars)
2222
:::
2323

24-
- To create a backward compatible **TurboModule**, follow [this guide](backward-compatibility-turbomodules).
25-
- To create a backward compatible **Fabric Component**, follow [this guide](backward-compatibility-fabric-components).
24+
- 要创建向后兼容的**TurboModule**,请遵循此[指南](backward-compatibility-turbomodules)
25+
- 要创建向后兼容的**Fabric 组件**, 请遵循此[指南](backward-compatibility-fabric-components)
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
22
id: backward-compatibility
3-
title: What Backward Compatibility Is
3+
title: 向后兼容的意义
44
---
55

66
import NewArchitectureWarning from '../\_markdown-new-architecture-warning.mdx';
77

88
<NewArchitectureWarning/>
99

10-
Creating a backward compatible module is important to provide a library that works in both the **Old Architecture** and the **New Architecture**. Not all the users of your library will immediately jump on the New Architecture ship: it is a good thing that they will be able to use your library even if they are still using the old architecture.
10+
创建一个向后兼容的模块很重要,这样可以实现在**旧架构****新架构**中都能工作的库。并不是所有用户都会立刻转到新架构,最好在他们使用旧架构时仍然保持兼容。
1111

12-
The trick to create a good backward compatible module is to minimize the changes required to adopt the new version. In that way, users of the module can smoothly move to the new version and migrate to the New Architecture when they are ready, ideally by issueing one different command.
12+
创建一个良好的向后兼容模块的要点是尽可能减少迁移到新版本所需的更改。这样用户就可以平稳地转到新版本,并在准备好时迁移到新架构,理想情况下最好只用输入一行不同的命令。
1313

14-
To achieve this result, we have to perform few changes in our **TurboModule** and **Fabric Component** configurations. The steps we have to follow are:
14+
为了实现这一结果,我们必须对**TurboModule****Fabric Component**的配置进行几次更改。下面是需要的步骤:
1515

16-
1. **Update the installation configuration** to avoid using code that is not needed by the Old Architecture.
17-
1. **Update the code** to support both architectures. Both Android and iOS build pipelines gives you mechanism to provide a library that will compile with the correct React Native Architecture.
18-
1. **Configure the specs to load the proper implementation**, so that the JavaScript layer leverages the New Architecture whan it is available.
16+
1. **更新安装配置**,以避免使用旧架构不需要的代码。
17+
2. **更新代码**,以支持两个架构。Android iOS 构建流水线都提供了一种方法,使得库能够与正确的 React Native 架构一起编译。
18+
3. **配置加载正确实现的规范**,以便 JavaScript 层在可用时利用新架构。
1919

2020
:::info
21-
The next sections requires that you are familiar with the [Pillars](pillars) of the **New Architecture**.
21+
接下来的部分要求您熟悉**新架构**[支柱](pillars)
2222
:::
2323

24-
- To create a backward compatible **TurboModule**, follow [this guide](backward-compatibility-turbomodules).
25-
- To create a backward compatible **Fabric Component**, follow [this guide](backward-compatibility-fabric-components).
24+
- 要创建向后兼容的**TurboModule**,请遵循此[指南](backward-compatibility-turbomodules)
25+
- 要创建向后兼容的**Fabric 组件**, 请遵循此[指南](backward-compatibility-fabric-components)

cnwebsite/versioned_docs/version-0.70/the-new-architecture/pillars.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: pillars
3-
title: 新架构的“两驾马车
3+
title: 新架构的“两大支柱
44
---
55

66
import NewArchitectureWarning from '../\_markdown-new-architecture-warning.mdx';

0 commit comments

Comments
 (0)