Skip to content

Commit adf854e

Browse files
fix: resolved conflicts
1 parent 9b9a67c commit adf854e

File tree

6 files changed

+5
-48
lines changed

6 files changed

+5
-48
lines changed

src/content/learn/conditional-rendering.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -626,11 +626,7 @@ export default function PackingList() {
626626
627627
要注意的是你必須寫成 `importance > 0 && ...` 而不是 `importance && ...` ,這樣如果 `importance` 的值為 `0` 時,才不會把 `0` 做為結果 render 出來。
628628
629-
<<<<<<< HEAD
630-
解答中為了在 name 和 importance 標籤之間插入一個空格,使用了兩段不同的條件。你也可以使用帶有空格前綴的 fragment: `importance > 0 && <> <i>...</i></>`,或是直接在 `<i>` 內部增加一個空格: `importance > 0 && <i> ...</i>`。
631-
=======
632-
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>`.
633-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
629+
在解答中,使用兩個單獨的條件在 name 和 importance 標籤之間插入一個空格。或者,你也可以使用帶有空格前綴的 fragment:`importance > 0 && <> <i>...</i></>`,或是直接在 `<i>` 內部增加一個空格: `importance > 0 && <i> ...</i>`。
634630
635631
</Solution>
636632

src/content/learn/describing-the-ui.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -538,27 +538,12 @@ React 使用 tree 來建模 component 和 module 之間的關係。
538538
React render tree 是 component 之間父子關係的表示。
539539

540540
<Diagram name="generic_render_tree" height={250} width={500} alt="A tree graph with five nodes, with each node representing a component. The root node is located at the top the tree graph and is labelled 'Root Component'. It has two arrows extending down to two nodes labelled 'Component A' and 'Component C'. Each of the arrows is labelled with 'renders'. 'Component A' has a single 'renders' arrow to a node labelled 'Component B'. 'Component C' has a single 'renders' arrow to a node labelled 'Component D'.">
541-
<<<<<<< HEAD
542-
=======
543-
544-
An example React render tree.
545-
546-
</Diagram>
547-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
548541

549542
一個 React render tree 範例。
550543

551544
</Diagram>
552545

553-
<<<<<<< HEAD
554546
靠近 tree 頂部、靠近 root component 的 component 被視為 top-level component。沒有 child component 的 component 是 leaf component。這種 component 分類對於理解 data flow 和 rendering 效能很有用。
555-
=======
556-
<Diagram name="generic_dependency_tree" height={250} width={500} alt="A tree graph with five nodes. Each node represents a JavaScript module. The top-most node is labelled 'RootModule.js'. It has three arrows extending to the nodes: 'ModuleA.js', 'ModuleB.js', and 'ModuleC.js'. Each arrow is labelled as 'imports'. 'ModuleC.js' node has a single 'imports' arrow that points to a node labelled 'ModuleD.js'.">
557-
558-
An example module dependency tree.
559-
560-
</Diagram>
561-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
562547

563548
對 JavaScript module 之間的關係進行建模是了解應用程式的另一種有用方法。 我們稱之為 module dependency tree。
564549

src/content/learn/rendering-lists.md

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

11461146
<Hint>
11471147

1148-
<<<<<<< HEAD
1149-
你可以嘗試把原本的 `map` 改成手動循環,或著嘗試使用 fragment 語法。
1150-
=======
1151-
You'll either need to convert `map` to a manual loop, or use a Fragment.
1152-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
1148+
你可以嘗試把原本的 `map` 改成手動循環,或著使用一個 Fragment。
11531149

11541150
</Hint>
11551151

@@ -1212,11 +1208,7 @@ hr {
12121208

12131209
原本使用詩句索引值作為 `key` 的方法已經行不通了,因爲現在 array 裡同時包含了分隔線和詩句。但是,你可以用加入後綴的方式給它們賦予獨一無二的 `key` 值,像是 `key={i + '-text'}` 這樣。
12141210

1215-
<<<<<<< HEAD
1216-
或著,你可以生產一個 fragment 包含 `<hr />``<p>...</p>`,但因為 fragment 簡寫 `<>...</>` 不支援設定 `key`,所以你需要寫成 `<Fragment>` 形式。
1217-
=======
1218-
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:
1219-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
1211+
或著,你可以 render 一個包含 `<hr />``<p>...</p>` 的 Fragment collection,但因為 Fragment 簡寫 `<>...</>` 不支援設定 `key`,所以你需要寫成 `<Fragment>` 形式。
12201212

12211213
<Sandpack>
12221214

@@ -1262,11 +1254,7 @@ hr {
12621254

12631255
</Sandpack>
12641256

1265-
<<<<<<< HEAD
1266-
記住,使用 fragment 語法 (通常寫作 `<> </>`) 來包覆 JSX nodes 可避免引入額外的 `div`
1267-
=======
1268-
Remember, Fragments (often written as `<> </>`) let you group JSX nodes without adding extra `<div>`s!
1269-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
1257+
記住,使用 Fragment 語法 (通常寫作 `<> </>`) 來包覆 JSX nodes 可避免引入額外的 `div`
12701258

12711259
</Solution>
12721260

src/content/reference/react-dom/components/input.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ To display an input, render the [built-in browser `<input>`](https://developer.m
3434

3535
<Canary>
3636

37-
<<<<<<< HEAD
38-
React's extensions to the `formAction` prop are currently only available in React's canary and experimental channels. In stable releases of React `formAction` works only as a [built-in browser HTML component](https://react.dev/reference/react-dom/components#all-html-components). Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
39-
=======
4037
React's extensions to the `formAction` prop are currently only available in React's Canary and experimental channels. In stable releases of React `formAction` works only as a [built-in browser HTML component](https://react.dev/reference/react-dom/components#all-html-components). Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
41-
>>>>>>> 4f9e9a56611c7a56b9506cf0a7ca84ab409824bc
4238
</Canary>
4339

4440
[`formAction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#formaction): A string or function. Overrides the parent `<form action>` for `type="submit"` and `type="image"`. When a URL is passed to `action` the form will behave like a standard HTML form. When a function is passed to `formAction` the function will handle the form submission. See [`<form action>`](/reference/react-dom/components/form#props).
@@ -221,7 +217,7 @@ export default function MyForm() {
221217
type="radio"
222218
name="myRadio"
223219
value="option2"
224-
defaultChecked={true}
220+
defaultChecked={true}
225221
/>
226222
Option 2
227223
</label>

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

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

66
<Canary>
77

8-
<<<<<<< HEAD
9-
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`.
10-
=======
118
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
139

1410
</Canary>
1511

src/content/reference/react/useOptimistic.md

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

66
<Canary>
77

8-
<<<<<<< HEAD
9-
The `useOptimistic` 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).
10-
=======
118
The `useOptimistic` 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
139

1410
</Canary>
1511

0 commit comments

Comments
 (0)