Skip to content

Commit aac5e9f

Browse files
authored
fix conflict
1 parent 786de5d commit aac5e9f

File tree

4 files changed

+9
-93
lines changed

4 files changed

+9
-93
lines changed

src/content/blog/index.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,21 @@ title: React Blog
44

55
<Intro>
66

7-
<<<<<<< HEAD
87
这个博客是 React 团队更新的官方来源。任何重要的内容,包括发布说明或弃用通知,都会首先在这里发布。
9-
=======
10-
This blog is the official source for the updates from the React team. Anything important, including release notes or deprecation notices, will be posted here first.
11-
12-
You can also follow the [@react.dev](https://bsky.app/profile/react.dev) account on Bluesky, or [@reactjs](https://twitter.com/reactjs) account on Twitter, but you won’t miss anything essential if you only read this blog.
13-
>>>>>>> 740016e4dea7e518bd045309bc3e828cc2a787a4
148

159
你也可以在 Bluesky 上关注 [@react.dev](https://bsky.app/profile/react.dev),或者在 Twitter 上关注 [@reactjs](https://twitter.com/reactjs)。不过只要你阅读这个博客,就不会错过任何重要内容。
1610
</Intro>
1711

1812
<div className="sm:-mx-5 flex flex-col gap-5 mt-12">
1913

20-
<<<<<<< HEAD
21-
<BlogCard title="逐步淘汰 Create React App" date="February 13, 2025" url="/blog/2025/02/14/sunsetting-create-react-app">
22-
=======
2314
<BlogCard title="React Compiler RC" date="April 21, 2025" url="/blog/2025/04/21/react-compiler-rc">
2415

2516
We are releasing the compiler's first Release Candidate (RC) today.
17+
我们今天将发布 React Compiler 的第一个候选发布版(RC)。
2618

2719
</BlogCard>
2820

29-
<BlogCard title="Sunsetting Create React App" date="February 14, 2025" url="/blog/2025/02/14/sunsetting-create-react-app">
30-
>>>>>>> 740016e4dea7e518bd045309bc3e828cc2a787a4
21+
<BlogCard title="逐步淘汰 Create React App" date="February 14, 2025" url="/blog/2025/02/14/sunsetting-create-react-app">
3122

3223
今日起,我们将正式弃用 Create React App 作为新应用的推荐工具,并建议现有应用迁移至框架或构建工具(如 Vite、Parcel 和 RSBuild)。我们还提供了相关文档用于这些情况:你的项目不适合使用框架、你想要构建自己的框架,或者只是想通过从零开始构建一个 React 应用来了解 React 的工作原理等等……
3324

src/content/learn/creating-a-react-app.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,7 @@ Next.js 的 App Router 还集成了 [使用 Suspense 的数据获取](/blog/2022
106106

107107
从零开始可以给你更多的灵活性,但同时也要求你必须自己选择用于路由、数据获取以及其他常见使用模式的工具。这更像自己构建一个框架,而不是使用一个已经存在的框架。[我们推荐的框架](#full-stack-frameworks) 为这些问题提供了内置的解决方案。
108108

109-
<<<<<<< HEAD
110109
如果你想构建自己的解决方案,请参阅我们的 [从零构建一个 React 应用](/learn/build-a-react-app-from-scratch) 指南,该指南提供了如何使用 [Vite](https://vite.dev/)[Parcel](https://parceljs.org/),或 [RSbuild](https://rsbuild.dev/) 等构建工具设置新 React 项目的说明。
111-
=======
112-
If you want to build your own solutions, see our guide to [build a React app from Scratch](/learn/build-a-react-app-from-scratch) for instructions on how to set up a new React project starting with a build tool like [Vite](https://vite.dev/), [Parcel](https://parceljs.org/), or [RSbuild](https://rsbuild.dev/).
113-
>>>>>>> 740016e4dea7e518bd045309bc3e828cc2a787a4
114110

115111
-----
116112

src/content/learn/react-compiler.md

Lines changed: 6 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ title: React Compiler
66
本页面将为你介绍新的 React Compiler,以及如何成功试用。
77
</Intro>
88

9-
<<<<<<< HEAD
10-
<Wip>
11-
这些文档仍在不断完善中。更多文档可在 [React Compiler 工作组代码库](https://github.com/reactwg/react-compiler/discussions) 中找到,并在这些文档更加稳定时被整合进来。
12-
</Wip>
13-
14-
=======
15-
>>>>>>> 740016e4dea7e518bd045309bc3e828cc2a787a4
169
<YouWillLearn>
1710

1811
* 开始使用 React Compiler
@@ -22,10 +15,9 @@ title: React Compiler
2215
</YouWillLearn>
2316

2417
<Note>
25-
<<<<<<< HEAD
26-
React Compiler 是一个处于 Beta 阶段的新的编译器,我们将其开源以获取社区的早期反馈。虽然Meta 等公司已经在生产中使用它,但是能否在你的应用程序中使用它取决于代码库的健康状态以及你遵守 [React 规则](/reference/rules) 的程度。
18+
React Compiler 是一个处于 RC 阶段的新的编译器,我们将其开源以获取社区反馈。现在我们建议所有人都使用编译器。
2719

28-
最新的 Beta 版本发布于 `@beta` 标签,每日实验版本发布于 `@experimental` 标签。
20+
最新的 RC 版本发布于 `@rc` 标签,每日实验版本发布于 `@experimental` 标签。
2921
</Note>
3022

3123
React Compiler 是一个新编译器,我们将其开源以获取社区的早期反馈。它是一个仅在构建时使用的工具,可以自动优化你的 React 应用程序。它可以与纯 JavaScript 一起使用,并且了解 [React 规则](/reference/rules),因此你无需重写任何代码即可使用它。
@@ -34,18 +26,6 @@ React Compiler 是一个新编译器,我们将其开源以获取社区的早
3426
编译器还包括一个 [ESLint 插件](#installing-eslint-plugin-react-compiler),可以在你的编辑器中直接显示编译器的分析结果。**我们强烈建议大家使用 linter。** 不过 linter 并不需要安装编译器,因此即使你还没有准备好尝试编译器也可以使用它。
3527

3628
编译器目前处于 `beta` 阶段,并且可以在 React 17+ 应用程序和库上使用。安装方式如下:
37-
=======
38-
React Compiler is a new compiler currently in RC, that we've open sourced to get feedback from the community. We now recommend everyone to try the compiler and provide feedback.
39-
40-
The latest RC release can be found with the `@rc` tag, and daily experimental releases with `@experimental`.
41-
</Note>
42-
43-
React Compiler is a new compiler that we've open sourced to get feedback from the community. It is a build-time only tool that automatically optimizes your React app. It works with plain JavaScript, and understands the [Rules of React](/reference/rules), so you don't need to rewrite any code to use it.
44-
45-
eslint-plugin-react-hooks also includes an [ESLint rule](#installing-eslint-plugin-react-compiler) that surfaces the analysis from the compiler right in your editor. **We strongly recommend everyone use the linter today.** The linter does not require that you have the compiler installed, so you can use it even if you are not ready to try out the compiler.
46-
47-
The compiler is currently released as `rc`, and is available to try out on React 17+ apps and libraries. To install the RC:
48-
>>>>>>> 740016e4dea7e518bd045309bc3e828cc2a787a4
4929

5030
<TerminalBlock>
5131
{`npm install -D babel-plugin-react-compiler@rc eslint-plugin-react-hooks@^6.0.0-rc.1`}
@@ -133,65 +113,23 @@ function TableContainer({ items }) {
133113

134114
### 我应该尝试一下编译器吗? {/*should-i-try-out-the-compiler*/}
135115

136-
<<<<<<< HEAD
137-
请注意,编译器仍处于 Beta 阶段,存在许多不完善之处。虽然它已经在 Meta 等公司的生产环境中使用过,但将编译器应用于你的应用程序生产环境将取决于你的代码库的健康状况以及你是否遵循了 [React 的规则](/reference/rules)
138-
=======
139-
The compiler is now in RC and has been tested extensively in production. While it has been used in production at companies like Meta, rolling out the compiler to production for your app will depend on the health of your codebase and how well you've followed the [Rules of React](/reference/rules).
140-
>>>>>>> 740016e4dea7e518bd045309bc3e828cc2a787a4
116+
请注意,编译器处于 RC 阶段,并已在生产中进行了广泛测试。虽然它已经在 Meta 等公司的生产环境中使用过,但将编译器应用于你的应用程序生产环境将取决于你的代码库的健康状况以及你是否遵循了 [React 的规则](/reference/rules)
141117

142118
**你现在不必急着使用编译器。在采用它之前等到它达到稳定版本是可以的。** 然而,我们确实赞赏在你的应用程序中进行小型实验,以便你可以向我们 [提供反馈](#reporting-issues),帮助使编译器更好。
143119

144120
## 开始 {/*getting-started*/}
145121

146122
除了这些文档之外,我们还建议查看 [React Compiler 工作组](https://github.com/reactwg/react-compiler),以获取有关编译器的更多信息和讨论。
147123

148-
<<<<<<< HEAD
149-
### 安装 eslint-plugin-react-compiler {/*installing-eslint-plugin-react-compiler*/}
150-
151-
React Compiler 还为 ESLint 插件提供支持。ESLint 插件可以**独立**于编译器使用,这意味着即使你不使用编译器,也可以使用 ESLint 插件。
152-
=======
153-
### Installing eslint-plugin-react-hooks {/*installing-eslint-plugin-react-compiler*/}
124+
### 安装 eslint-plugin-react-hooks {/*installing-eslint-plugin-react-compiler*/}
154125

155-
React Compiler also powers an ESLint plugin. You can try it out by installing eslint-plugin-react-hooks@^6.0.0-rc.1.
156-
>>>>>>> 740016e4dea7e518bd045309bc3e828cc2a787a4
126+
React Compiler 还支持作为 ESLint 插件。你可以通过安装 eslint-plugin-react-hooks@^6.0.0-rc.1 来使用它。
157127

158128
<TerminalBlock>
159129
{`npm install -D eslint-plugin-react-hooks@^6.0.0-rc.1`}
160130
</TerminalBlock>
161131

162-
<<<<<<< HEAD
163-
然后,将其添加到你的 ESLint 配置中:
164-
165-
```js
166-
import reactCompiler from 'eslint-plugin-react-compiler'
167-
168-
export default [
169-
{
170-
plugins: {
171-
'react-compiler': reactCompiler,
172-
},
173-
rules: {
174-
'react-compiler/react-compiler': 'error',
175-
},
176-
},
177-
]
178-
```
179-
180-
或者使用已弃用的 eslintrc 配置格式:
181-
182-
```js
183-
module.exports = {
184-
plugins: [
185-
'eslint-plugin-react-compiler',
186-
],
187-
rules: {
188-
'react-compiler/react-compiler': 'error',
189-
},
190-
}
191-
```
192-
=======
193-
See our [editor setup](/learn/editor-setup#linting) guide for more details.
194-
>>>>>>> 740016e4dea7e518bd045309bc3e828cc2a787a4
132+
查看 [编辑器设置](/learn/editor-setup#linting) 指南来了解更多信息。
195133

196134
ESLint 插件将在编辑器中显示任何违反 React 规则的行为。当它这样做时,这意味着编译器跳过了优化该组件或钩子。这是完全可以的,编译器可以恢复并继续优化代码库中的其他组件。
197135

src/content/versions.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@ React 文档位于 [react.dev](https://react.dev),提供最新版本 React 的
1010

1111
我们致力于在主要版本内保持文档的更新,并不会为每个次要版本或补丁版本发布单独的文档版本。当一个新的主要版本发布时,我们会将前一个版本的文档存档为 `x.react.dev`。有关更多信息,请参阅我们的[版本控制政策](/community/versioning-policy)
1212

13-
<<<<<<< HEAD
1413
你可以在下方找到以前主要版本的存档。
15-
## 最新版本:19.0 {/*latest-version*/}
16-
=======
17-
You can find an archive of previous major versions below.
18-
## Latest version: 19.1 {/*latest-version*/}
19-
>>>>>>> 740016e4dea7e518bd045309bc3e828cc2a787a4
14+
## 最新版本:19.1 {/*latest-version*/}
2015

2116
- [react.dev](https://react.dev) {/*docs-19*/}
2217

@@ -55,12 +50,8 @@ You can find an archive of previous major versions below.
5550
- [React Compiler Case Studies](https://www.youtube.com/watch?v=lvhPq5chokM)
5651
- [React 19 Deep Dive: Coordinating HTML](https://www.youtube.com/watch?v=IBBN-s77YSI)
5752

58-
<<<<<<< HEAD
5953
**发布版本**
60-
=======
61-
**Releases**
6254
- [v19.1.0 (March, 2025)](https://github.com/facebook/react/blob/main/CHANGELOG.md#1910-march-28-2025)
63-
>>>>>>> 740016e4dea7e518bd045309bc3e828cc2a787a4
6455
- [v19.0.0 (December, 2024)](https://github.com/facebook/react/blob/main/CHANGELOG.md#1900-december-5-2024)
6556

6657
### React 18 {/*react-18*/}

0 commit comments

Comments
 (0)