Skip to content

Commit 0cf0236

Browse files
authored
Merge pull request #76 from reactjs/fix/conflicts
Resolve conflict for last merge.
2 parents 0ca6b61 + cdc96ac commit 0cf0236

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

content/docs/handling-events.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ function ActionLink() {
5656

5757
Ở đây, `e` là một sự kiện ảo. React định nghĩa những sự kiện ảo này dựa trên [chuẩn W3C](https://www.w3.org/TR/DOM-Level-3-Events/), nên bạn không cần lo lắng về sự tương thích giữa những browser. Hãy tham khảo tài liệu về [`SyntheticEvent`](/docs/events.html) để tìm hiểu thêm.
5858

59-
<<<<<<< HEAD
60-
Khi làm việc với React, bạn thường không phải gọi `addEventListener` để gắn listener cho element DOM khi nó được khởi tạo. Thay vào đó, bạn chỉ cần gắn listener ngay lần đầu element được render.
61-
=======
62-
When using React, you generally don't need to call `addEventListener` to add listeners to a DOM element after it is created. Instead, just provide a listener when the element is initially rendered.
63-
>>>>>>> 5b6ad388804aaa5cf5504ccd04329f52960e17ae
59+
Khi làm việc với React, bạn thường không cần phải gọi `addEventListener` để gắn listener cho element DOM sau khi nó được khởi tạo. Thay vào đó, bạn chỉ cần cung cấp một listener ngay lần đầu element được render.
6460

6561
Khi bạn định nghĩa component bằng [class ES6](https://developer.mozilla.org/vi/docs/Web/JavaScript/Reference/Classes), một mẫu thiết kế phổ biến là sử dụng phương thức của class để bắt sự kiện. Ví dụ, component `Toggle` dưới đây render một chiếc nút để người dùng thay đổi giữa state “ON” và “OFF":
6662

@@ -146,11 +142,7 @@ Vấn đề với cú pháp này nằm ở chỗ một callback khác sẽ đư
146142

147143
## Truyền Tham số vào Hàm Bắt Sự kiện {#passing-arguments-to-event-handlers}
148144

149-
<<<<<<< HEAD
150-
Trong một vòng lặp, việc truyền thêm tham số vào hàm bắt sự kiện khá phổ biến. Nếu `id` là số định danh của một hàng, thì hai ví dụ duới đây đều hoạt động được:
151-
=======
152-
Inside a loop, it is common to want to pass an extra parameter to an event handler. For example, if `id` is the row ID, either of the following would work:
153-
>>>>>>> 5b6ad388804aaa5cf5504ccd04329f52960e17ae
145+
Bên trong một vòng lặp, người ta thường muốn truyền thêm một parameter cho một event handler. Ví dụ như, nếu `id` là ID của dòng (row), thì 2 dòng code bên dưới sẽ work:
154146

155147
```js
156148
<button onClick={(e) => this.deleteRow(id, e)}>Delete Row</button>

content/docs/introducing-jsx.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,4 @@ Chúng ta sẽ khám phá cách các React Element được render vào DOM th
181181

182182
>**Gợi ý:**
183183
>
184-
<<<<<<< HEAD
185-
>Chúng tôi khuyến khích sử dụng [Định nghĩa ngôn ngữ "Babel"](https://babeljs.io/docs/editors) cho trình soạn thảo của bạn như vậy cả mã ES6 và JSX đều có thể được tô sáng rõ ràng. Trang web này dùng tập màu [Oceanic Next](https://labs.voronianski.com/oceanic-next-color-scheme/) cái mà phù hợp cho việc này.
186-
=======
187-
>We recommend using the ["Babel" language definition](https://babeljs.io/docs/editors) for your editor of choice so that both ES6 and JSX code is properly highlighted. This website uses the [Oceanic Next](https://github.com/voronianski/oceanic-next-color-scheme) color scheme which is compatible with it.
188-
>>>>>>> 5b6ad388804aaa5cf5504ccd04329f52960e17ae
184+
>Chúng tôi khuyến khích sử dụng [Định nghĩa ngôn ngữ "Babel"](https://babeljs.io/docs/editors) cho trình soạn thảo của bạn như vậy cả mã ES6 và JSX đều có thể được tô sáng rõ ràng. Trang web này dùng tập màu [Oceanic Next](https://github.com/voronianski/oceanic-next-color-scheme) cái mà phù hợp cho việc này.

0 commit comments

Comments
 (0)