Skip to content

Commit 9576778

Browse files
committed
fix: resolve conflicts
1 parent 7201c2e commit 9576778

File tree

8 files changed

+10
-58
lines changed

8 files changed

+10
-58
lines changed

src/content/blog/2023/03/16/introducing-react-dev.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,7 @@ export default function PackingList() {
428428

429429
请注意,你必须写成 `importance > 0 && ...` 而不是 `importance && ...`,这样如果 `importance` 的值为 `0` 时,就不会将 `0` 作为结果进行渲染!
430430

431-
<<<<<<< HEAD
432-
在这个解决方案中,使用了两个独立的条件来在名称和 importance label 之间插入一个空格。或者,你可以使用带有前导空格的片段:`importance > 0 && <> <i>...</i></>`,或者在 `<i>` 标签内立即添加一个空格:`importance > 0 && <i> ...</i>`
433-
=======
434-
In this solution, two separate conditions are used to insert a space between then name and the importance label. Alternatively, you could use a Fragment with a leading space: `importance > 0 && <> <i>...</i></>` or add a space immediately inside the `<i>`: `importance > 0 && <i> ...</i>`.
435-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
431+
在这个解决方案中,使用了两个独立的条件来在名称和 importance label 之间插入一个空格。或者,你可以使用带有前导空格的 Fragment:`importance > 0 && <> <i>...</i></>`,或者在 `<i>` 标签内立即添加一个空格:`importance > 0 && <i> ...</i>`
436432

437433
</Solution>
438434

@@ -646,9 +642,4 @@ button { display: block; margin-top: 10px; }
646642

647643
非常感谢那些自愿参加 alpha 和 beta 测试计划的人。你们的热情和宝贵的反馈帮助我们塑造了这些文档。特别感谢我们的 beta 测试人员 [Debbie O'Brien](https://twitter.com/debs_obrien),她在 React Conf 2021 上分享了她使用 React 文档的经验。
648644

649-
<<<<<<< HEAD
650645
最后,感谢 React 社区的启发,是你们促使我们完成了这个新的项目。我们希望新文档将帮助大家使用 React 构建任何你想要的用户界面。
651-
652-
=======
653-
Finally, thanks to the React community for being the inspiration behind this effort. You are the reason we do this, and we hope that the new docs will help you use React to build any user interface that you want.
654-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc

src/content/community/versioning-policy.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,10 @@ React 的开发版本包含许多有用的警告信息。只要可能,我们
4444

4545
总的来说,我们不会为以下更改而增加主要版本号:
4646

47-
<<<<<<< HEAD
4847
* **开发警告**。由于这些不会影响生产行为,我们可能会在主要版本之间添加新的警告或修改现有警告。事实上,这正是我们能够可靠地警告即将发生的重大变化的原因。
4948
* **`unstable_` 开头的 API**。这些被提供作为实验性功能,我们对其 API 还不够自信。通过以` unstable_` 前缀发布这些版本,我们可以更快地迭代并尽快达到稳定的 API。
50-
* **React 的 alpha 和 canary 版本**。我们提供 React 的 alpha 版本作为早期测试新功能的一种方式,但我们需要根据在 alpha 期间学到的知识来灵活进行更改。如果你使用这些版本,请注意在稳定版本发布之前 API 可能会发生变化。
49+
* **React 的 alpha 和 Canary 版本**。我们提供 React 的 alpha 版本作为早期测试新功能的一种方式,但我们需要根据在 alpha 期间学到的知识来灵活进行更改。如果你使用这些版本,请注意在稳定版本发布之前 API 可能会发生变化。
5150
* **未记录的 API 和内部数据结构**。如果你访问内部属性名如 `__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED``__reactInternalInstance$uk43rzhitjg`,则无法得到保证,你将自负其责。
52-
=======
53-
* **Development warnings.** Since these don't affect production behavior, we may add new warnings or modify existing warnings in between major versions. In fact, this is what allows us to reliably warn about upcoming breaking changes.
54-
* **APIs starting with `unstable_`.** These are provided as experimental features whose APIs we are not yet confident in. By releasing these with an `unstable_` prefix, we can iterate faster and get to a stable API sooner.
55-
* **Alpha and Canary versions of React.** We provide alpha versions of React as a way to test new features early, but we need the flexibility to make changes based on what we learn in the alpha period. If you use these versions, note that APIs may change before the stable release.
56-
* **Undocumented APIs and internal data structures.** If you access internal property names like `__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED` or `__reactInternalInstance$uk43rzhitjg`, there is no warranty. You are on your own.
57-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
5851

5952
此策略旨在务实:当然,我们不希望给你带来麻烦。如果我们为所有这些更改增加主要版本,我们将不断发布更多的主要版本,并最终给社区带来更多版本管理的困扰。这也意味着我们无法以我们希望的速度推进改进 React。
6053

src/content/learn/conditional-rendering.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -628,11 +628,7 @@ export default function PackingList() {
628628

629629
需注意的是,你必须使用 `importance > 0 && ...` 而不是 `importance && ...`,这样如果 `importantce``0``0` 就不会被渲染出来了!
630630

631-
<<<<<<< HEAD
632-
在这个解决方案里,分别用了两个条件判断在名字和重要性标签里插入一个空格。另外,你也可以通过一个带前导空格的 fragment :`importance > 0 && <> <i>...</i></>`,或者将空格放在 `<i>` 标签内:`importance > 0 && <i> ...</i>`, 来实现相同的效果。
633-
=======
634-
In this solution, two separate conditions are used to insert a space between the name and the importance label. Alternatively, you could use a Fragment with a leading space: `importance > 0 && <> <i>...</i></>` or add a space immediately inside the `<i>`: `importance > 0 && <i> ...</i>`.
635-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
631+
在这个解决方案里,分别用了两个条件判断在名字和重要性标签里插入一个空格。另外,你也可以通过一个带前导空格的 Fragment :`importance > 0 && <> <i>...</i></>`,或者将空格放在 `<i>` 标签内:`importance > 0 && <i> ...</i>`, 来实现相同的效果。
636632

637633
</Solution>
638634

src/content/learn/rendering-lists.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,11 +1206,7 @@ hr {
12061206

12071207
<Hint>
12081208

1209-
<<<<<<< HEAD
1210-
你可以尝试把原本的 `map` 改造成手动循环,或者试下 fragment 语法。
1211-
=======
1212-
You'll either need to convert `map` to a manual loop, or use a Fragment.
1213-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
1209+
你可以尝试把原本的 `map` 改造成手动循环,或者试下 Fragment 语法。
12141210

12151211
</Hint>
12161212

@@ -1273,11 +1269,7 @@ hr {
12731269

12741270
原本使用诗句顺序索引作为 `key` 的方法已经行不通了,因为现在数组里同时包含了分隔符和诗句。但是,你可以用添加后缀的形式给它们赋予独一无二的 key 值,比如 `key={i + '-text'}` 这样。
12751271

1276-
<<<<<<< HEAD
1277-
另一种做法是,生成包含 `<hr />``<p>...</p>` 的 fragment 集合,但因其简写语法 `<> </>` 不支持指定 key,所以你需要写成 `<Fragment>` 的形式。
1278-
=======
1279-
Alternatively, you could render a collection of Fragments which contain `<hr />` and `<p>...</p>`. However, the `<>...</>` shorthand syntax doesn't support passing keys, so you'd have to write `<Fragment>` explicitly:
1280-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
1272+
另一种做法是,生成包含 `<hr />``<p>...</p>` 的 Fragment 集合,但因其简写语法 `<> </>` 不支持指定 key,所以需要写成 `<Fragment>` 的形式。
12811273

12821274
<Sandpack>
12831275

@@ -1323,11 +1315,7 @@ hr {
13231315

13241316
</Sandpack>
13251317

1326-
<<<<<<< HEAD
1327-
记住,采用 fragment 语法(通常写作 `<> </>`)来包裹 JSX 节点可以避免引入额外的 `<div>` 元素!
1328-
=======
1329-
Remember, Fragments (often written as `<> </>`) let you group JSX nodes without adding extra `<div>`s!
1330-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
1318+
记住,使用 Fragment 语法(通常写作 `<> </>`)来包裹 JSX 节点可以避免引入额外的 `<div>` 元素!
13311319

13321320
</Solution>
13331321

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,7 @@ export default function Square() {
366366

367367
</ConsoleBlock>
368368

369-
<<<<<<< HEAD
370-
React 组件必须返回单个 JSX 元素,不能像两个按钮那样返回多个相邻的 JSX 元素。要解决此问题,可以使用 `<>``</>` 来包裹多个相邻的 JSX 元素,如下所示:
371-
=======
372-
React components need to return a single JSX element and not multiple adjacent JSX elements like two buttons. To fix this you can use *Fragments* (`<>` and `</>`) to wrap multiple adjacent JSX elements like this:
373-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
369+
React 组件必须返回单个 JSX 元素,不能像两个按钮那样返回多个相邻的 JSX 元素。要解决此问题,可以使用 Fragment(`<>``</>`)包裹多个相邻的 JSX 元素,如下所示:
374370

375371
```js {3-6}
376372
export default function Square() {

src/content/reference/react-dom/hooks/useFormState.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ canary: true
55

66
<Canary>
77

8-
<<<<<<< HEAD
9-
`useFormState` Hook 当前仅在 React canary 与 experimental 渠道中可用。请点此了解更多关于 [React 发布渠道](/community/versioning-policy#all-release-channels) 的信息。此外,需要一款完全支持 [React 服务器组件](/reference/react/use-client) 特性的框架才可以使用 `useFormState` 的所有特性。
10-
=======
11-
The `useFormState` Hook is currently only available in React's Canary and experimental channels. Learn more about [release channels here](/community/versioning-policy#all-release-channels). In addition, you need to use a framework that supports [React Server Components](/reference/react/use-client) to get the full benefit of `useFormState`.
12-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
8+
`useFormState` Hook 当前仅在 React Canary 与 experimental 渠道中可用。请点此了解更多关于 [React 发布渠道](/community/versioning-policy#all-release-channels) 的信息。此外,需要一款完全支持 [React 服务器组件](/reference/react/use-client) 特性的框架才可以使用 `useFormState` 的所有特性。
139

1410
</Canary>
1511

src/content/reference/react-dom/hooks/useFormStatus.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ canary: true
55

66
<Canary>
77

8-
<<<<<<< HEAD
9-
`useFormStatus` Hook 目前仅在 React canary 与 experimental 渠道中可用。在此处了解更多关于 [React 发布渠道](/community/versioning-policy#all-release-channels) 的信息。
10-
=======
11-
The `useFormStatus` Hook is currently only available in React's Canary and experimental channels. Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
12-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
8+
`useFormStatus` Hook 目前仅在 React Canary 与 experimental 渠道中可用。在此处了解更多关于 [React 发布渠道](/community/versioning-policy#all-release-channels) 的信息。
139

1410
</Canary>
1511

src/content/reference/react/use.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ canary: true
55

66
<Canary>
77

8-
<<<<<<< HEAD
9-
`use` Hook 仅在 canary 与 experimental 渠道中可用。参阅 [React 发布渠道](/community/versioning-policy#all-release-channels) 以了解更多信息。
10-
=======
11-
The `use` Hook is currently only available in React's Canary and experimental channels. Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
12-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
8+
`use` Hook 仅在 Canary 与 experimental 渠道中可用。参阅 [React 发布渠道](/community/versioning-policy#all-release-channels) 以了解更多信息。
139

1410
</Canary>
1511

0 commit comments

Comments
 (0)