Skip to content

Commit 1824442

Browse files
resolved conflicts
Signed-off-by: Jie Peng <[email protected]>
1 parent ca764a9 commit 1824442

26 files changed

+144
-281
lines changed

content/docs/components-and-props.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,16 @@ prev: rendering-elements.html
1616
next: state-and-lifecycle.html
1717
---
1818

19-
<<<<<<< HEAD
20-
Component 使你可以將 UI 拆分成獨立且可複用的程式碼,並且專注於各別程式碼的思考。本章節旨在介紹 component 的相關概念,你也可以在此參閱[詳細的 API 文件](/docs/react-component.html)
21-
=======
22-
> Try the new React documentation.
23-
>
24-
> These new documentation pages teach modern React and include live examples:
19+
> 嘗試新的 React 文件。
20+
>
21+
> 這些新的文件頁面教導 modern React 並包括即時範例:
2522
>
2623
> - [Your First Component](https://beta.reactjs.org/learn/your-first-component)
2724
> - [Passing Props to a Component](https://beta.reactjs.org/learn/passing-props-to-a-component)
28-
>
29-
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
25+
> 新的文件將會很快取代目前的文件,它將會被歸檔。[提供回饋。](https://github.com/reactjs/reactjs.org/issues/3308)
3026
31-
Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. This page provides an introduction to the idea of components. You can find a [detailed component API reference here](/docs/react-component.html).
32-
>>>>>>> 47adefd30c46f486428d8231a68e639d62f02c9e
27+
Component 使你可以將 UI 拆分成獨立且可複用的程式碼,並且專注於各別程式碼的思考。本章節旨在介紹 component 的相關概念,你也可以在此參閱[詳細的 API 文件](/docs/react-component.html)
28+
> 嘗試新的 React 文件。
3329
3430
概念上來說,component 就像是 JavaScript 的 function,它接收任意的參數(稱之為「props」)並且回傳描述畫面的 React element。
3531

content/docs/conditional-rendering.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,16 @@ redirect_from:
88
- "tips/false-in-jsx.html"
99
---
1010

11-
<<<<<<< HEAD
12-
在 React 中,你可以建立不同的 component 來封裝你需要的行為。接著,你可以根據你的應用程式的 state,來 render 其中的一部份。
13-
=======
14-
> Try the new React documentation.
15-
>
16-
> These new documentation pages teach modern React and include live examples:
11+
> 嘗試新的 React 文件。
12+
>
13+
> 這些新的文件頁面教導 modern React 並包括即時範例:
1714
>
1815
> - [Conditional Rendering](https://beta.reactjs.org/learn/conditional-rendering)
1916
>
20-
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
17+
> 新的文件將會很快取代目前的文件,它將會被歸檔。[提供回饋。](https://github.com/reactjs/reactjs.org/issues/3308)
2118
2219

23-
In React, you can create distinct components that encapsulate behavior you need. Then, you can render only some of them, depending on the state of your application.
24-
>>>>>>> 47adefd30c46f486428d8231a68e639d62f02c9e
20+
在 React 中,你可以建立不同的 component 來封裝你需要的行為。接著,你可以根據你的應用程式的 state,來 render 其中的一部份。
2521

2622
React 中的條件 rendering 跟 JavaScript 一致。使用 JavaScript 中的運算子如 [`if`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) 或者 [三元運算子](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) 來建立表示目前 state 的 element,然後讓 React 根據它們來更新 UI。
2723

content/docs/forms.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,17 @@ redirect_from:
99
- "docs/forms-zh-CN.html"
1010
---
1111

12-
<<<<<<< HEAD
13-
HTML 表單的 element 和 React 中其他的 DOM element 不太一樣,因為表單的 element 很自然地有一些內部的 state。例如,這個表單在下面簡單的 HTML 中接受一個名稱:
14-
=======
15-
> Try the new React documentation.
16-
>
17-
> These new documentation pages teach modern React and include live examples:
12+
> 嘗試新的 React 文件。
13+
>
14+
> 這些新的文件頁面教導 modern React 並包括即時範例:
1815
>
1916
> - [`<input>`](https://beta.reactjs.org/reference/react-dom/components/input)
2017
> - [`<select>`](https://beta.reactjs.org/reference/react-dom/components/select)
2118
> - [`<textarea>`](https://beta.reactjs.org/reference/react-dom/components/textarea)
2219
>
23-
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
20+
> 新的文件將會很快取代目前的文件,它將會被歸檔。[提供回饋。](https://github.com/reactjs/reactjs.org/issues/3308)
2421
25-
HTML form elements work a bit differently from other DOM elements in React, because form elements naturally keep some internal state. For example, this form in plain HTML accepts a single name:
26-
>>>>>>> 47adefd30c46f486428d8231a68e639d62f02c9e
22+
HTML 表單的 element 和 React 中其他的 DOM element 不太一樣,因為表單的 element 很自然地有一些內部的 state。例如,這個表單在下面簡單的 HTML 中接受一個名稱:
2723

2824
```html
2925
<form>

content/docs/forwarding-refs.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,16 @@ title: 傳送 Ref
44
permalink: docs/forwarding-refs.html
55
---
66

7-
<<<<<<< HEAD
8-
傳送 ref 是一種自動把 [ref](/docs/refs-and-the-dom.html) 從一個 component 傳遞到它底下的其中一個 child 的技巧。通常來說,應用程式裡大部分的 component 都不需要用到它。然而,對某些種類的 component 來說它很有用,特別是能夠重複使用的函式庫。以下會解釋最常見的情形。
9-
=======
10-
> Try the new React documentation.
11-
>
12-
> These new documentation pages teach modern React and include live examples:
7+
> 嘗試新的 React 文件。
8+
>
9+
> 這些新的文件頁面教導 modern React 並包括即時範例:
1310
>
1411
> - [Manipulating the DOM with Refs](https://beta.reactjs.org/learn/manipulating-the-dom-with-refs)
1512
> - [`forwardRef`](https://beta.reactjs.org/reference/react/forwardRef)
1613
>
17-
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
14+
> 新的文件將會很快取代目前的文件,它將會被歸檔。[提供回饋。](https://github.com/reactjs/reactjs.org/issues/3308)
1815
19-
Ref forwarding is a technique for automatically passing a [ref](/docs/refs-and-the-dom.html) through a component to one of its children. This is typically not necessary for most components in the application. However, it can be useful for some kinds of components, especially in reusable component libraries. The most common scenarios are described below.
20-
>>>>>>> 47adefd30c46f486428d8231a68e639d62f02c9e
16+
傳送 ref 是一種自動把 [ref](/docs/refs-and-the-dom.html) 從一個 component 傳遞到它底下的其中一個 child 的技巧。通常來說,應用程式裡大部分的 component 都不需要用到它。然而,對某些種類的 component 來說它很有用,特別是能夠重複使用的函式庫。以下會解釋最常見的情形。
2117

2218
## 傳送 ref 到 DOM component {#forwarding-refs-to-dom-components}
2319

content/docs/getting-started.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,13 @@ redirect_from:
1818
- "docs/environments.html"
1919
---
2020

21-
<<<<<<< HEAD
22-
本章節是 React 文件與相關資訊的概覽。
23-
=======
24-
> Try the new React documentation.
25-
>
26-
> The new [Quick Start](https://beta.reactjs.org/learn) teaches modern React and includes live examples.
21+
> 嘗試新的 React 文件。
22+
>
23+
> 新的 [Quick Start](https://beta.reactjs.org/learn) 頁面教導 modern React 並包括即時範例。
2724
>
28-
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
25+
> 新的文件將會很快取代目前的文件,它將會被歸檔。[提供回饋。](https://github.com/reactjs/reactjs.org/issues/3308)
2926
30-
This page is an overview of the React documentation and related resources.
31-
>>>>>>> 47adefd30c46f486428d8231a68e639d62f02c9e
27+
本章節是 React 文件與相關資訊的概覽。
3228

3329
**React** 是一個實作使用者介面的 JavaScript 函式庫。請到我們的[主頁](/)[教學](/tutorial/tutorial.html)中學習什麼是 React。
3430

content/docs/handling-events.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,16 @@ redirect_from:
88
- "docs/events-ko-KR.html"
99
---
1010

11-
<<<<<<< HEAD
12-
使用 React element 處理事件跟使用 DOM element 處理事件是十分相似的。它們有一些語法上的差異:
13-
=======
14-
> Try the new React documentation.
15-
>
16-
> These new documentation pages teach modern React and include live examples:
11+
> 嘗試新的 React 文件。
12+
>
13+
> 這些新的文件頁面教導 modern React 並包括即時範例:
1714
>
1815
> - [Responding to Events](https://beta.reactjs.org/learn/responding-to-events)
1916
>
20-
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
17+
> 新的文件將會很快取代目前的文件,它將會被歸檔。[提供回饋。](https://github.com/reactjs/reactjs.org/issues/3308)
2118
2219

23-
Handling events with React elements is very similar to handling events on DOM elements. There are some syntax differences:
24-
>>>>>>> 47adefd30c46f486428d8231a68e639d62f02c9e
20+
使用 React element 處理事件跟使用 DOM element 處理事件是十分相似的。它們有一些語法上的差異:
2521

2622
* 事件的名稱在 React 中都是 camelCase,而在 HTML DOM 中則是小寫。
2723
* 事件的值在 JSX 中是一個 function,而在 HTML DOM 中則是一個 string。

content/docs/hooks-custom.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@ next: hooks-reference.html
66
prev: hooks-rules.html
77
---
88

9-
<<<<<<< HEAD
10-
*Hook* 是 React 16.8 中增加的新功能。它讓你不必寫 class 就能使用 state 以及其他 React 的功能。
11-
=======
12-
> Try the new React documentation.
13-
>
14-
> These new documentation pages teach modern React and include live examples:
9+
> 嘗試新的 React 文件。
10+
>
11+
> 這些新的文件頁面教導 modern React 並包括即時範例:
1512
>
1613
> - [Reusing Logic with Custom Hooks](https://beta.reactjs.org/learn/reusing-logic-with-custom-hooks)
1714
>
18-
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
15+
> 新的文件將會很快取代目前的文件,它將會被歸檔。[提供回饋。](https://github.com/reactjs/reactjs.org/issues/3308)
1916
20-
*Hooks* are a new addition in React 16.8. They let you use state and other React features without writing a class.
21-
>>>>>>> 47adefd30c46f486428d8231a68e639d62f02c9e
17+
*Hook* 是 React 16.8 中增加的新功能。它讓你不必寫 class 就能使用 state 以及其他 React 的功能。
2218

2319
打造你自己的 Hook 可以將 component 邏輯提取到可重複使用的 function 中。
2420

content/docs/hooks-effect.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,17 @@ next: hooks-rules.html
66
prev: hooks-state.html
77
---
88

9-
<<<<<<< HEAD
10-
*Hook* 是 React 16.8 中增加的新功能。它讓你不必寫 class 就能使用 state 以及其他 React 的功能。
11-
=======
12-
> Try the new React documentation.
13-
>
14-
> These new documentation pages teach modern React and include live examples:
9+
> 嘗試新的 React 文件。
10+
>
11+
> 這些新的文件頁面教導 modern React 並包括即時範例:
1512
>
1613
> - [Synchronizing with Effects](https://beta.reactjs.org/learn/synchronizing-with-effects)
1714
> - [You Might Not Need an Effect](https://beta.reactjs.org/learn/you-might-not-need-an-effect)
1815
> - [`useEffect`](https://beta.reactjs.org/reference/react/useEffect)
1916
>
20-
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
17+
> 新的文件將會很快取代目前的文件,它將會被歸檔。[提供回饋。](https://github.com/reactjs/reactjs.org/issues/3308)
2118
22-
*Hooks* are a new addition in React 16.8. They let you use state and other React features without writing a class.
23-
>>>>>>> 47adefd30c46f486428d8231a68e639d62f02c9e
19+
*Hook* 是 React 16.8 中增加的新功能。它讓你不必寫 class 就能使用 state 以及其他 React 的功能。
2420

2521
*Effect Hook* 讓你可以使用 function component 中的 side effect:
2622

content/docs/hooks-reference.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -514,16 +514,12 @@ FancyInput = forwardRef(FancyInput);
514514

515515
### `useLayoutEffect` {#uselayouteffect}
516516

517-
<<<<<<< HEAD
518-
與宣告 `useEffect` 本身相同,但它會在所有 DOM 改變後,同步調用。使用它來讀取 DOM layout 並同步重新 render。在瀏覽器執行繪製之前,`useLayoutEffect` 內部的更新將被同步刷新。
519-
=======
520-
> Try the new React documentation for [`useLayoutEffect`](https://beta.reactjs.org/reference/react/useLayoutEffect).
517+
> 嘗試 [`useLayoutEffect`](https://beta.reactjs.org/reference/react/useLayoutEffect) 的 Reacy 新文件。
521518
>
522-
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
519+
> 新的文件將會很快取代目前的文件,它將會被歸檔。[提供回饋。](https://github.com/reactjs/reactjs.org/issues/3308)
523520
524521

525-
The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations. Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside `useLayoutEffect` will be flushed synchronously, before the browser has a chance to paint.
526-
>>>>>>> 47adefd30c46f486428d8231a68e639d62f02c9e
522+
與宣告 `useEffect` 本身相同,但它會在所有 DOM 改變後,同步調用。使用它來讀取 DOM layout 並同步重新 render。在瀏覽器執行繪製之前,`useLayoutEffect` 內部的更新將被同步刷新。
527523

528524
盡可能使用標準的 `useEffect` 來避免阻礙視覺上的更新。
529525

content/docs/hooks-state.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,16 @@ next: hooks-effect.html
66
prev: hooks-overview.html
77
---
88

9-
<<<<<<< HEAD
10-
*Hook* 是 React 16.8 中增加的新功能。它讓你不必寫 class 就能使用 state 以及其他 React 的功能。
11-
=======
12-
> Try the new React documentation.
13-
>
14-
> These new documentation pages teach modern React and include live examples:
9+
> 嘗試新的 React 文件。
10+
>
11+
> 這些新的文件頁面教導 modern React 並包括即時範例:
1512
>
1613
> - [State: A Component's Memory](https://beta.reactjs.org/learn/state-a-components-memory)
1714
> - [`useState`](https://beta.reactjs.org/reference/react/useState)
1815
>
19-
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
16+
> 新的文件將會很快取代目前的文件,它將會被歸檔。[提供回饋。](https://github.com/reactjs/reactjs.org/issues/3308)
2017
21-
*Hooks* are a new addition in React 16.8. They let you use state and other React features without writing a class.
22-
>>>>>>> 47adefd30c46f486428d8231a68e639d62f02c9e
18+
*Hook* 是 React 16.8 中增加的新功能。它讓你不必寫 class 就能使用 state 以及其他 React 的功能。
2319

2420
[介紹 Hook](/docs/hooks-intro.html) 使用過這個範例讓我們熟悉 Hook:
2521

0 commit comments

Comments
 (0)