Skip to content

Commit 6f3fd1e

Browse files
authored
fix conflict
1 parent bdeb2c3 commit 6f3fd1e

File tree

6 files changed

+1
-49
lines changed

6 files changed

+1
-49
lines changed

src/content/reference/react-dom/static/prerenderToNodeStream.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,7 @@ app.use('/', async (request, response) => {
8888
8989
### 将 React 树渲染到静态 HTML 的流中 {/*rendering-a-react-tree-to-a-stream-of-static-html*/}
9090
91-
<<<<<<< HEAD
9291
调用 `prerenderToNodeStream` 可将 React 树渲染为指向 [Node.js 流](https://nodejs.org/api/stream.html) 的静态 HTML:
93-
=======
94-
Call `prerenderToNodeStream` to render your React tree to static HTML into a [Node.js Stream](https://nodejs.org/api/stream.html):
95-
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2
9692
9793
```js [[1, 5, "<App />"], [2, 6, "['/main.js']"]]
9894
import { prerenderToNodeStream } from 'react-dom/static';

src/content/reference/react/Component.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,19 +1334,11 @@ class ErrorBoundary extends React.Component {
13341334
13351335
如果 `Profile` 或其子组件抛出错误,`ErrorBoundary` 将“捕获”该错误,然后显示带有你提供的错误消息的后备 UI,并向你的错误报告服务发送生产错误报告。
13361336
1337-
<<<<<<< HEAD
13381337
你不需要将每个组件包装到单独的错误边界中。当你考虑 [错误边界的布置](https://aweary.dev/fault-tolerance-react/) 时,请考虑在哪里显示错误消息才有意义。例如,在消息传递应用程序中,在对话列表周围放置错误边界是有意义的。在每条单独的消息周围放置一个也是有意义的。然而,在每个头像周围设置边界是没有意义的。
13391338
13401339
<Note>
13411340
13421341
目前还没有办法将错误边界编写为函数式组件。但是你不必自己编写错误边界类。例如,你可以使用 [`react-error-boundary`](https://github.com/bvaughn/react-error-boundary) 包来代替。
1343-
=======
1344-
You don't need to wrap every component into a separate Error Boundary. When you think about the [granularity of Error Boundaries,](https://www.brandondail.com/posts/fault-tolerance-react) consider where it makes sense to display an error message. For example, in a messaging app, it makes sense to place an Error Boundary around the list of conversations. It also makes sense to place one around every individual message. However, it wouldn't make sense to place a boundary around every avatar.
1345-
1346-
<Note>
1347-
1348-
There is currently no way to write an Error Boundary as a function component. However, you don't have to write the Error Boundary class yourself. For example, you can use [`react-error-boundary`](https://github.com/bvaughn/react-error-boundary) instead.
1349-
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2
13501342
13511343
</Note>
13521344

src/content/reference/react/Profiler.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,7 @@ function onRender(id, phase, actualDuration, baseDuration, startTime, commitTime
8181

8282
<Pitfall>
8383

84-
<<<<<<< HEAD
85-
进行性能分析会增加一些额外的开销,因此 **在默认情况下,它在生产环境中是被禁用的**。如果要启用生产环境下的性能分析,你需要启用 [特殊的带有性能分析功能的生产构建](https://fb.me/react-profiling)
86-
=======
87-
Profiling adds some additional overhead, so **it is disabled in the production build by default.** To opt into production profiling, you need to enable a [special production build with profiling enabled.](/reference/dev-tools/react-performance-tracks#using-profiling-builds)
88-
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2
84+
进行性能分析会增加一些额外的开销,因此 **在默认情况下,它在生产环境中是被禁用的**。如果要启用生产环境下的性能分析,你需要启用 [特殊的带有性能分析功能的生产构建](/reference/dev-tools/react-performance-tracks#using-profiling-builds)
8985

9086
</Pitfall>
9187

src/content/reference/react/cache.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,10 @@ function Chart({data}) {
6262

6363
#### 注意 {/*caveats*/}
6464

65-
<<<<<<< HEAD
66-
[//]: # 'TODO: 一旦 https://github.com/reactjs/react.dev/pull/6177 被合并,将为服务器组件/客户端组件(Server/Client Component)引用添加链接'
67-
6865
- React 将在每次服务器请求时使所有记忆化函数的缓存失效。
6966
- 每次调用 `cache` 都会创建一个新函数。这意味着多次使用相同的函数调用 `cache` 将返回不共享相同缓存的不同记忆化函数。
7067
- `cachedFn` 还会缓存错误。如果对于某些参数 `fn` 抛出错误,错误将被缓存,当使用相同参数调用 `cachedFn` 时,相同的错误将被重新抛出。
7168
- `cache` 仅供在 [服务器组件](/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023#react-server-components) 中使用。
72-
=======
73-
- React will invalidate the cache for all memoized functions for each server request.
74-
- Each call to `cache` creates a new function. This means that calling `cache` with the same function multiple times will return different memoized functions that do not share the same cache.
75-
- `cachedFn` will also cache errors. If `fn` throws an error for certain arguments, it will be cached, and the same error is re-thrown when `cachedFn` is called with those same arguments.
76-
- `cache` is for use in [Server Components](/reference/rsc/server-components) only.
77-
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2
7869

7970
---
8071

@@ -212,27 +203,16 @@ async function MinimalWeatherCard({city}) {
212203

213204
<Note>
214205

215-
<<<<<<< HEAD
216-
[//]: # 'TODO: 合并后向服务器组件添加链接。'
217-
218206
<CodeStep step={3}>异步渲染</CodeStep> 只在服务器组件中支持。
219-
=======
220-
<CodeStep step={3}>Asynchronous rendering</CodeStep> is only supported for Server Components.
221-
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2
222207

223208
```js [[3, 1, "async"], [3, 2, "await"]]
224209
async function AnimatedWeatherCard({city}) {
225210
const temperature = await getTemperature(city);
226211
// ...
227212
}
228213
```
229-
<<<<<<< HEAD
230-
[//]: # 'TODO: 合并后在文档中添加链接和提醒。'
231-
[//]: # '参与 `use` 相关文档以了解更多关于在客户端组件中使用异步数据渲染组件的内容。'
232-
=======
233214

234215
To render components that use asynchronous data in Client Components, see [`use()` documentation](/reference/react/use).
235-
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2
236216

237217
</Note>
238218

src/content/reference/react/useEffectEvent.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,7 @@ function Page({ url }) {
9090
}
9191
```
9292

93-
<<<<<<< HEAD
94-
你可以将 `url` 这样的响应式值作为参数传递给 Effect Event。这让你可以访问最新的值,而不必因为这些值的改变而让 Effect 重新运行。
95-
=======
9693
In this example, the Effect should re-run after a render when `url` changes (to log the new page visit), but it should **not** re-run when `numberOfItems` changes. By wrapping the logging logic in an Effect Event, `numberOfItems` becomes non-reactive. It's always read from the latest value without triggering the Effect.
9794

9895
You can pass reactive values like `url` as arguments to the Effect Event to keep them reactive while accessing the latest non-reactive values inside the event.
9996

100-
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2

src/content/versions.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,8 @@ React 文档位于 [react.dev](https://react.dev),提供最新版本 React 的
5252
- [React Compiler Case Studies](https://www.youtube.com/watch?v=lvhPq5chokM)
5353
- [React 19 Deep Dive: Coordinating HTML](https://www.youtube.com/watch?v=IBBN-s77YSI)
5454

55-
<<<<<<< HEAD
5655
**发布版本**
57-
=======
58-
**Releases**
5956
- [v19.2.0 (October, 2025)](https://github.com/facebook/react/blob/main/CHANGELOG.md#1920-october-1st-2025)
60-
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2
6157
- [v19.1.0 (March, 2025)](https://github.com/facebook/react/blob/main/CHANGELOG.md#1910-march-28-2025)
6258
- [v19.0.0 (December, 2024)](https://github.com/facebook/react/blob/main/CHANGELOG.md#1900-december-5-2024)
6359

@@ -302,11 +298,7 @@ React 文档位于 [react.dev](https://react.dev),提供最新版本 React 的
302298

303299
React 于 2013 年 5 月 29 日开源。初始提交为:[`75897c`: Initial public release](https://github.com/facebook/react/commit/75897c2dcd1dd3a6ca46284dd37e13d22b4b16b4)
304300

305-
<<<<<<< HEAD
306301
请参阅第一篇博客文章:[Why did we build React?](https://legacy.reactjs.org/blog/2013/06/05/why-react.html)
307-
=======
308-
See the first blog post: [Why did we build React?](https://legacy.reactjs.org/blog/2013/06/05/why-react.html)
309-
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2
310302

311303
React 于 2013 年在 Facebook 西雅图办公室开源:
312304

0 commit comments

Comments
 (0)