You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/concurrent-mode-reference.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ For more information on Concurrent Mode, check out the [Concurrent Mode document
59
59
60
60
`Suspense` lets your components "wait" for something before they can render, showing a fallback while waiting.
61
61
62
-
In this example, `ProfileDetails` is waiting for an asynchronous API call to fetch some data. While we wait for `ProfileDetails` and `ProfilePhoto`, we will show the `Loading...` fallback instead. It is important to note that until all children inside `<Suspense>`has loaded, we will continue to show the fallback.
62
+
In this example, `ProfileDetails` is waiting for an asynchronous API call to fetch some data. While we wait for `ProfileDetails` and `ProfilePhoto`, we will show the `Loading...` fallback instead. It is important to note that until all children inside `<Suspense>`have loaded, we will continue to show the fallback.
63
63
64
64
`Suspense` takes two props:
65
65
***fallback** takes a loading indicator. The fallback is shown until all of the children of the `Suspense` component have finished rendering.
Copy file name to clipboardExpand all lines: content/docs/forms.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,11 @@ redirect_from:
9
9
- "docs/forms-zh-CN.html"
10
10
---
11
11
12
+
<<<<<<< HEAD
12
13
Trong React, HTML form element sẽ hoạt động hơi khác một chút so với các DOM element còn lại, form element sẽ giữ và tự xử lí một số state nội bộ (internal state) của riêng nó. Ví dụ như form dưới đây trong HTML sẽ nhận vào giá trị của input name.
14
+
=======
15
+
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:
Copy file name to clipboardExpand all lines: content/docs/handling-events.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,27 +29,31 @@ sẽ có đôi chút khác biệt trong React:
29
29
</button>
30
30
```
31
31
32
+
<<<<<<< HEAD
32
33
Một điểm khác biệt nữa trong React là bạn không thể trả về `false` để chặn những hành vi mặc định mà phải gọi `preventDefault` trực tiếp. Lấy ví dụ với đoạn HTML sau, để chặn hành vi mặc định của đường dẫn là mở trang mới, bạn có thể viết:
34
+
=======
35
+
Another difference is that you cannot return `false` to prevent default behavior in React. You must call `preventDefault` explicitly. For example, with plain HTML, to prevent the default form behavior of submitting, you can write:
36
+
>>>>>>> 68e4efcf93b6e589355f6aa3cbc3f3c811c0ad37
33
37
34
38
```html
35
-
<ahref="#"onclick="console.log('The link was clicked.'); return false">
Copy file name to clipboardExpand all lines: content/docs/hello-world.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,11 @@ React là một thư viện JavaScript, và vì thế chúng tôi giả định
40
40
41
41
>Ghi chú
42
42
>
43
+
<<<<<<< HEAD
43
44
>Hướng dẫn này thỉnh thoảng sử dụng một vài cấu trúc JavaScript mới trong các ví dụ. Nếu bạn chưa từng làm việc với JavaScript trong những năm gần đây, [Ba điều này](https://gist.github.com/gaearon/683e676101005de0add59e8bb345340c) sẽ mang cho bạn kiến thức để bạn cảm thấy thoải mái hơn khi đọc các tài liệu của React.
45
+
=======
46
+
>This guide occasionally uses some newer JavaScript syntax in the examples. If you haven't worked with JavaScript in the last few years, [these three points](https://gist.github.com/gaearon/683e676101005de0add59e8bb345340c) should get you most of the way.
Copy file name to clipboardExpand all lines: content/docs/higher-order-components.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -297,7 +297,7 @@ The `compose` utility function is provided by many third-party libraries includi
297
297
298
298
## Convention: Wrap the Display Name for Easy Debugging {#convention-wrap-the-display-name-for-easy-debugging}
299
299
300
-
The container components created by HOCs show up in the [React Developer Tools](https://github.com/facebook/react-devtools) like any other component. To ease debugging, choose a display name that communicates that it's the result of a HOC.
300
+
The container components created by HOCs show up in the [React Developer Tools](https://github.com/facebook/react/tree/master/packages/react-devtools) like any other component. To ease debugging, choose a display name that communicates that it's the result of a HOC.
301
301
302
302
The most common technique is to wrap the display name of the wrapped component. So if your higher-order component is named `withSubscription`, and the wrapped component's display name is `CommentList`, use the display name `WithSubscription(CommentList)`:
Copy file name to clipboardExpand all lines: content/docs/lists-and-keys.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,7 +209,11 @@ Một nguyên tắc nhỏ đó là các element bên trong hàm gọi `map()` c
209
209
210
210
### Các Key Chỉ Bắt Buộc Là Duy Nhất Giữa Các Nút Anh Em (Siblings) {#keys-must-only-be-unique-among-siblings}
211
211
212
+
<<<<<<< HEAD
212
213
Các Key được sử dụng bên trong các mảng nên là duy nhất giữa các nút anh em của chúng. Tuy nhiên chúng không cần là duy nhất đối với toàn bộ component. Chúng ta có thể sử dụng các key giống nhau khi chúng ta tạo hai mảng khác nhau:
214
+
=======
215
+
Keys used within arrays should be unique among their siblings. However, they don't need to be globally unique. We can use the same keys when we produce two different arrays:
Copy file name to clipboardExpand all lines: content/docs/thinking-in-react.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,11 @@ Có 2 kiểu "mô hình" dữ liệu trong React: props và state. Hiểu ra s
84
84
85
85
Để xây dựng ứng dụng của bạn một cách chuẩn xác, đầu tiên cần suy nghĩ về một tập hợp tối thiểu các state có khả năng thay đổi trong ứng dựng. Trọng điểm là [DRY: *Không lập lại*](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) Xác định tập hợp này và tính toán những yêu cầu khác. Ví dụ, bạn tạo ra một danh sách TODO, không nên dùng state để đếm phần tử của mảng TODO. Thay vào đó khi in ra số lượng TODO, chỉ cần tính độ dài của mảng TODO.
86
86
87
+
<<<<<<< HEAD
87
88
Suy tính về các thành phần dữ liệu trong ví dụ ứng dựng, nó bao gồm:
89
+
=======
90
+
Think of all the pieces of data in our example application. We have:
0 commit comments