Skip to content

Commit 72e365e

Browse files
authored
fix conflict
1 parent b5b9297 commit 72e365e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/content/reference/react-dom/client/hydrateRoot.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,7 @@ root.unmount();
101101
102102
这主要适用于 React 根节点的 DOM 节点(或其任何祖先节点)可能会被其他代码从 DOM 中移除的情况。例如,想象一下一个 jQuery 标签面板,它会将非活动标签从 DOM 中移除。如果一个标签被移除,其内部的所有内容(包括其中的 React 根节点)也将从 DOM 中移除。你需要调用 `root.unmount` 来告诉 React “停止”管理已移除根节点的内容。否则,已移除根节点内的组件将无法清理和释放已使用的资源,例如订阅。
103103
104-
<<<<<<< HEAD
105104
调用 `root.unmount` 将卸载根节点中的所有组件,并“分离” React 与根 DOM 节点之间的连接,包括删除树中的任何事件处理程序或状态。
106-
=======
107-
Calling `root.unmount` will unmount all the components in the root and "detach" React from the root DOM node, including removing any event handlers or state in the tree.
108-
>>>>>>> 4a4e579fdb4fd4b97bc4b983487c2e83291211fd
109105
110106
111107
#### 参数 {/*root-unmount-parameters*/}
@@ -276,11 +272,7 @@ export default function App() {
276272
277273
</Sandpack>
278274
279-
<<<<<<< HEAD
280-
此方法仅适用于当前层级,并且旨在作为一种脱围机制。不要滥用它。除非是文本内容,否则 React 不会尝试修补它,因此可能会保持不一致,直到未来的更新来到。
281-
=======
282-
This only works one level deep, and is intended to be an escape hatch. Don’t overuse it. React will **not** attempt to patch mismatched text content.
283-
>>>>>>> 4a4e579fdb4fd4b97bc4b983487c2e83291211fd
275+
此方法仅适用于当前层级,并且旨在作为一种脱围机制。不要滥用它。React **不会** 尝试修补不匹配的文本内容。
284276
285277
---
286278

0 commit comments

Comments
 (0)