Skip to content

Commit f6417da

Browse files
author
Google
committed
translate to vi #2
1 parent 88a215e commit f6417da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+3972
-4273
lines changed

src/components/Layout/HomeContent.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,9 @@ export function HomeContent() {
197197
</FullBleed>
198198
<Center>
199199
<Para>
200-
Cú pháp markup này được gọi là JSX. Đây là một phần mở rộng cú
201-
pháp JavaScript được React популяризировал. Đặt JSX markup gần với
202-
logic hiển thị liên quan giúp React component dễ tạo, bảo trì và
203-
xóa.
200+
Cú pháp đánh dấu này được gọi là JSX. Đây là phần mở rộng cú pháp
201+
JavaScript được React phổ biến. Đặt đánh dấu JSX gần với logic kết
202+
xuất liên quan giúp các thành phần React dễ tạo, bảo trì và xóa.
204203
</Para>
205204
</Center>
206205
</Section>

src/content/reference/react-dom/client/createRoot.md

Lines changed: 120 additions & 120 deletions
Large diffs are not rendered by default.

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

Lines changed: 384 additions & 386 deletions
Large diffs are not rendered by default.

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

Lines changed: 135 additions & 134 deletions
Large diffs are not rendered by default.

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

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
11
---
2-
title: "React DOM Components"
2+
title: "Các thành phần React DOM"
33
---
44

55
<Intro>
66

7-
React supports all of the browser built-in [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) and [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Element) components.
7+
React hỗ trợ tất cả các thành phần [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Element) được tích hợp sẵn của trình duyệt.
88

99
</Intro>
1010

1111
---
1212

13-
## Common components {/*common-components*/}
13+
## Các thành phần phổ biến {/*common-components*/}
1414

15-
All of the built-in browser components support some props and events.
15+
Tất cả các thành phần trình duyệt tích hợp sẵn đều hỗ trợ một số thuộc tính và sự kiện.
1616

17-
* [Common components (e.g. `<div>`)](/reference/react-dom/components/common)
17+
* [Các thành phần phổ biến (ví dụ: `<div>`)](/reference/react-dom/components/common)
1818

19-
This includes React-specific props like `ref` and `dangerouslySetInnerHTML`.
19+
Điều này bao gồm các thuộc tính dành riêng cho React như `ref` `dangerouslySetInnerHTML`.
2020

2121
---
2222

23-
## Form components {/*form-components*/}
23+
## Các thành phần biểu mẫu {/*form-components*/}
2424

25-
These built-in browser components accept user input:
25+
Các thành phần trình duyệt tích hợp sẵn này chấp nhận đầu vào của người dùng:
2626

2727
* [`<input>`](/reference/react-dom/components/input)
2828
* [`<select>`](/reference/react-dom/components/select)
2929
* [`<textarea>`](/reference/react-dom/components/textarea)
3030

31-
They are special in React because passing the `value` prop to them makes them *[controlled.](/reference/react-dom/components/input#controlling-an-input-with-a-state-variable)*
31+
Chúng đặc biệt trong React vì việc truyền thuộc tính `value` cho chúng sẽ khiến chúng trở thành *[được kiểm soát.](/reference/react-dom/components/input#controlling-an-input-with-a-state-variable)*
3232

3333
---
3434

35-
## Resource and Metadata Components {/*resource-and-metadata-components*/}
35+
## Các thành phần Tài nguyên và Siêu dữ liệu {/*resource-and-metadata-components*/}
3636

37-
These built-in browser components let you load external resources or annotate the document with metadata:
37+
Các thành phần trình duyệt tích hợp sẵn này cho phép bạn tải tài nguyên bên ngoài hoặc chú thích tài liệu bằng siêu dữ liệu:
3838

3939
* [`<link>`](/reference/react-dom/components/link)
4040
* [`<meta>`](/reference/react-dom/components/meta)
4141
* [`<script>`](/reference/react-dom/components/script)
4242
* [`<style>`](/reference/react-dom/components/style)
4343
* [`<title>`](/reference/react-dom/components/title)
4444

45-
They are special in React because React can render them into the document head, suspend while resources are loading, and enact other behaviors that are described on the reference page for each specific component.
45+
Chúng đặc biệt trong React React có thể hiển thị chúng vào đầu tài liệu, tạm dừng trong khi tài nguyên đang tải và ban hành các hành vi khác được mô tả trên trang tham khảo cho từng thành phần cụ thể.
4646

4747
---
4848

49-
## All HTML components {/*all-html-components*/}
49+
## Tất cả các thành phần HTML {/*all-html-components*/}
5050

51-
React supports all built-in browser HTML components. This includes:
51+
React hỗ trợ tất cả các thành phần HTML trình duyệt tích hợp sẵn. Điều này bao gồm:
5252

5353
* [`<aside>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside)
5454
* [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio)
@@ -154,38 +154,38 @@ React supports all built-in browser HTML components. This includes:
154154

155155
<Note>
156156

157-
Similar to the [DOM standard,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React uses a `camelCase` convention for prop names. For example, you'll write `tabIndex` instead of `tabindex`. You can convert existing HTML to JSX with an [online converter.](https://transform.tools/html-to-jsx)
157+
Tương tự như [tiêu chuẩn DOM,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React sử dụng quy ước `camelCase` cho tên thuộc tính. Ví dụ: bạn sẽ viết `tabIndex` thay vì `tabindex`. Bạn có thể chuyển đổi HTML hiện có sang JSX bằng một [công cụ chuyển đổi trực tuyến.](https://transform.tools/html-to-jsx)
158158

159159
</Note>
160160

161161
---
162162

163-
### Custom HTML elements {/*custom-html-elements*/}
163+
### Các phần tử HTML tùy chỉnh {/*custom-html-elements*/}
164164

165-
If you render a tag with a dash, like `<my-element>`, React will assume you want to render a [custom HTML element.](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) In React, rendering custom elements works differently from rendering built-in browser tags:
165+
Nếu bạn hiển thị một thẻ có dấu gạch ngang, chẳng hạn như `<my-element>`, React sẽ cho rằng bạn muốn hiển thị một [phần tử HTML tùy chỉnh.](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) Trong React, việc hiển thị các phần tử tùy chỉnh hoạt động khác với việc hiển thị các thẻ trình duyệt tích hợp sẵn:
166166

167-
- All custom element props are serialized to strings and are always set using attributes.
168-
- Custom elements accept `class` rather than `className`, and `for` rather than `htmlFor`.
167+
- Tất cả các thuộc tính của phần tử tùy chỉnh được tuần tự hóa thành chuỗi và luôn được đặt bằng các thuộc tính.
168+
- Các phần tử tùy chỉnh chấp nhận `class` thay vì `className` `for` thay vì `htmlFor`.
169169

170-
If you render a built-in browser HTML element with an [`is`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/is) attribute, it will also be treated as a custom element.
170+
Nếu bạn hiển thị một phần tử HTML trình duyệt tích hợp sẵn với thuộc tính [`is`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/is), nó cũng sẽ được coi là một phần tử tùy chỉnh.
171171

172172
<Note>
173173

174-
[A future version of React will include more comprehensive support for custom elements.](https://github.com/facebook/react/issues/11347#issuecomment-1122275286)
174+
[Một phiên bản React trong tương lai sẽ bao gồm hỗ trợ toàn diện hơn cho các phần tử tùy chỉnh.](https://github.com/facebook/react/issues/11347#issuecomment-1122275286)
175175

176-
You can try it by upgrading React packages to the most recent experimental version:
176+
Bạn có thể thử bằng cách nâng cấp các gói React lên phiên bản thử nghiệm mới nhất:
177177

178178
- `react@experimental`
179179
- `react-dom@experimental`
180180

181-
Experimental versions of React may contain bugs. Don't use them in production.
181+
Các phiên bản thử nghiệm của React có thể chứa lỗi. Không sử dụng chúng trong sản xuất.
182182

183183
</Note>
184184
---
185185

186-
## All SVG components {/*all-svg-components*/}
186+
## Tất cả các thành phần SVG {/*all-svg-components*/}
187187

188-
React supports all built-in browser SVG components. This includes:
188+
React hỗ trợ tất cả các thành phần SVG trình duyệt tích hợp sẵn. Điều này bao gồm:
189189

190190
* [`<a>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/a)
191191
* [`<animate>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate)
@@ -256,20 +256,20 @@ React supports all built-in browser SVG components. This includes:
256256

257257
<Note>
258258

259-
Similar to the [DOM standard,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React uses a `camelCase` convention for prop names. For example, you'll write `tabIndex` instead of `tabindex`. You can convert existing SVG to JSX with an [online converter.](https://transform.tools/)
260-
261-
Namespaced attributes also have to be written without the colon:
262-
263-
* `xlink:actuate` becomes `xlinkActuate`.
264-
* `xlink:arcrole` becomes `xlinkArcrole`.
265-
* `xlink:href` becomes `xlinkHref`.
266-
* `xlink:role` becomes `xlinkRole`.
267-
* `xlink:show` becomes `xlinkShow`.
268-
* `xlink:title` becomes `xlinkTitle`.
269-
* `xlink:type` becomes `xlinkType`.
270-
* `xml:base` becomes `xmlBase`.
271-
* `xml:lang` becomes `xmlLang`.
272-
* `xml:space` becomes `xmlSpace`.
273-
* `xmlns:xlink` becomes `xmlnsXlink`.
259+
Tương tự như [tiêu chuẩn DOM,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React sử dụng quy ước `camelCase` cho tên thuộc tính. Ví dụ: bạn sẽ viết `tabIndex` thay vì `tabindex`. Bạn có thể chuyển đổi SVG hiện có sang JSX bằng một [công cụ chuyển đổi trực tuyến.](https://transform.tools/)
260+
261+
Các thuộc tính có không gian tên cũng phải được viết không có dấu hai chấm:
262+
263+
* `xlink:actuate` trở thành `xlinkActuate`.
264+
* `xlink:arcrole` trở thành `xlinkArcrole`.
265+
* `xlink:href` trở thành `xlinkHref`.
266+
* `xlink:role` trở thành `xlinkRole`.
267+
* `xlink:show` trở thành `xlinkShow`.
268+
* `xlink:title` trở thành `xlinkTitle`.
269+
* `xlink:type` trở thành `xlinkType`.
270+
* `xml:base` trở thành `xmlBase`.
271+
* `xml:lang` trở thành `xmlLang`.
272+
* `xml:space` trở thành `xmlSpace`.
273+
* `xmlns:xlink` trở thành `xmlnsXlink`.
274274

275275
</Note>

0 commit comments

Comments
 (0)