Skip to content

Commit 3b7a324

Browse files
authored
Merge pull request #26 from tuantvk/master
translate vietnamese home page, header, footer
2 parents f7e79f8 + f9d0a9f commit 3b7a324

File tree

18 files changed

+78
-77
lines changed

18 files changed

+78
-77
lines changed

content/community/nav.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- title: Community Resources
1+
- title: Nguồn cộng đồng
22
items:
33
- id: support
44
title: Support
@@ -18,7 +18,7 @@
1818
title: Videos
1919
- id: external-resources
2020
title: External Resources
21-
- title: Tools
21+
- title: Công cụ
2222
items:
2323
- id: debugging-tools
2424
title: Debugging

content/docs/faq-ajax.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
22
id: faq-ajax
3-
title: AJAX and APIs
3+
title: AJAX APIs
44
permalink: docs/faq-ajax.html
55
layout: docs
66
category: FAQ
77
---
88

9-
### How can I make an AJAX call? {#how-can-i-make-an-ajax-call}
9+
### Làm như nào để gọi AJAX ? {#how-can-i-make-an-ajax-call}
1010

11-
You can use any AJAX library you like with React. Some popular ones are [Axios](https://github.com/axios/axios), [jQuery AJAX](https://api.jquery.com/jQuery.ajax/), and the browser built-in [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
11+
Bạn có thể sử dụng bất kỳ thư viện AJAX nào bạn thích với React. Một số thư viện phổ biến như [Axios](https://github.com/axios/axios), [jQuery AJAX](https://api.jquery.com/jQuery.ajax/), và trình duyệt tích hợp sẵn [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
1212

13-
### Where in the component lifecycle should I make an AJAX call? {#where-in-the-component-lifecycle-should-i-make-an-ajax-call}
13+
### Nên gọi AJAX ở đâu trong vòng đời component ? {#where-in-the-component-lifecycle-should-i-make-an-ajax-call}
1414

15-
You should populate data with AJAX calls in the [`componentDidMount`](/docs/react-component.html#mounting) lifecycle method. This is so you can use `setState` to update your component when the data is retrieved.
15+
Bạn nên gọi AJAX ở componentDidMount của các phương thức vòng đời [`componentDidMount`](/docs/react-component.html#mounting). Điều này để bạn có thể sử dụng `setState` để cập nhật component khi có dữ liệu được lấy.
16+
<!-- ### Ví dụ: Using AJAX results to set local state {#example-using-ajax-results-to-set-local-state} -->
17+
### Ví dụ: Sử dụng dữ liệu của AJAX xét vào state {#example-using-ajax-results-to-set-local-state}
1618

17-
### Example: Using AJAX results to set local state {#example-using-ajax-results-to-set-local-state}
19+
Component dưới đây thể hiện cách thực hiện gọi AJAX trong `componentDidMount` để xét dữ liệu vào state.
1820

19-
The component below demonstrates how to make an AJAX call in `componentDidMount` to populate local component state.
20-
21-
The example API returns a JSON object like this:
21+
Ví dụ API trả về một object JSON như sau:
2222

2323
```
2424
{

content/docs/faq-build.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
---
22
id: faq-build
3-
title: Babel, JSX, and Build Steps
3+
title: Babel, JSX, và từng bước xây dựng
44
permalink: docs/faq-build.html
55
layout: docs
66
category: FAQ
77
---
88

9-
### Do I need to use JSX with React? {#do-i-need-to-use-jsx-with-react}
9+
### Tôi có cần phải sử dụng JSX với React không? {#do-i-need-to-use-jsx-with-react}
1010

11-
No! Check out ["React Without JSX"](/docs/react-without-jsx.html) to learn more.
11+
Không! Hãy xem thử ["React không dùng JSX"](/docs/react-without-jsx.html) để hiểu thêm.
1212

13-
### Do I need to use ES6 (+) with React? {#do-i-need-to-use-es6--with-react}
13+
### Tôi có cần phải sử dụng ES6 (+) với React? {#do-i-need-to-use-es6--with-react}
1414

15-
No! Check out ["React Without ES6"](/docs/react-without-es6.html) to learn more.
15+
Không! Hãy xem thử ["React không dùng ES6"](/docs/react-without-es6.html) để hiểu thêm.
1616

17-
### How can I write comments in JSX? {#how-can-i-write-comments-in-jsx}
17+
### Làm như nào để tôi viết comment trong JSX ? {#how-can-i-write-comments-in-jsx}
1818

1919
```jsx
2020
<div>
21-
{/* Comment goes here */}
21+
{/* Comment ở đây */}
2222
Hello, {name}!
2323
</div>
2424
```
2525

2626
```jsx
2727
<div>
28-
{/* It also works
29-
for multi-line comments. */}
28+
{/* Nó cũng hoạt động
29+
cho nhiều dòng comments. */}
3030
Hello, {name}!
3131
</div>
3232
```

content/docs/faq-styling.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
id: faq-styling
3-
title: Styling and CSS
3+
title: Styling CSS
44
permalink: docs/faq-styling.html
55
layout: docs
66
category: FAQ
77
---
88

9-
### How do I add CSS classes to components? {#how-do-i-add-css-classes-to-components}
9+
### Làm thế nào tôi chèn class CSS cho components? {#how-do-i-add-css-classes-to-components}
1010

11-
Pass a string as the `className` prop:
11+
Truyền tên của class cho prop là `className`:
1212

1313
```jsx
1414
render() {
@@ -32,20 +32,20 @@ render() {
3232
>
3333
>If you often find yourself writing code like this, [classnames](https://www.npmjs.com/package/classnames#usage-with-reactjs) package can simplify it.
3434
35-
### Can I use inline styles? {#can-i-use-inline-styles}
35+
### Tôi có dùng được inline styles? {#can-i-use-inline-styles}
3636

37-
Yes, see the docs on styling [here](/docs/dom-elements.html#style).
37+
Có, xem tài liệu styling tại [đây](/docs/dom-elements.html#style).
3838

39-
### Are inline styles bad? {#are-inline-styles-bad}
39+
### Viết inline styles xấu? {#are-inline-styles-bad}
4040

41-
CSS classes are generally better for performance than inline styles.
41+
Các class CSS thường sẽ có hiệu xuất tốt hơn là inline styles.
4242

43-
### What is CSS-in-JS? {#what-is-css-in-js}
43+
### CSS-in-JS là gì? {#what-is-css-in-js}
4444

4545
"CSS-in-JS" refers to a pattern where CSS is composed using JavaScript instead of defined in external files. Read a comparison of CSS-in-JS libraries [here](https://github.com/MicheleBertoli/css-in-js).
4646

4747
_Note that this functionality is not a part of React, but provided by third-party libraries._ React does not have an opinion about how styles are defined; if in doubt, a good starting point is to define your styles in a separate `*.css` file as usual and refer to them using [`className`](/docs/dom-elements.html#classname).
4848

49-
### Can I do animations in React? {#can-i-do-animations-in-react}
49+
### Tôi có thể dùng animations trong React? {#can-i-do-animations-in-react}
5050

51-
React can be used to power animations. See [React Transition Group](https://reactcommunity.org/react-transition-group/) and [React Motion](https://github.com/chenglou/react-motion), for example.
51+
React có thể sử dụng animations rất tốt. Xem ví dụ [React Transition Group](https://reactcommunity.org/react-transition-group/) [React Motion](https://github.com/chenglou/react-motion).

content/docs/nav.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- title: Installation
1+
- title: Cài đặt
22
items:
33
- id: getting-started
44
title: Getting Started
@@ -8,7 +8,7 @@
88
title: Create a New React App
99
- id: cdn-links
1010
title: CDN Links
11-
- title: Main Concepts
11+
- title: Khái niệm chính
1212
isOrdered: true
1313
items:
1414
- id: hello-world
@@ -35,7 +35,7 @@
3535
title: Composition vs Inheritance
3636
- id: thinking-in-react
3737
title: Thinking In React
38-
- title: Advanced Guides
38+
- title: Hướng dẫn nâng cao
3939
items:
4040
- id: accessibility
4141
title: Accessibility
@@ -79,7 +79,7 @@
7979
title: Uncontrolled Components
8080
- id: web-components
8181
title: Web Components
82-
- title: API Reference
82+
- title: API Tham khảo
8383
items:
8484
- id: react-api
8585
title: React
@@ -123,7 +123,7 @@
123123
title: Tham chiếu Hooks API
124124
- id: hooks-faq
125125
title: Hooks FAQ
126-
- title: Contributing
126+
- title: Đóng góp
127127
items:
128128
- id: how-to-contribute
129129
title: How to Contribute
@@ -136,15 +136,15 @@
136136
- title: FAQ
137137
items:
138138
- id: faq-ajax
139-
title: AJAX and APIs
139+
title: AJAX APIs
140140
- id: faq-build
141141
title: Babel, JSX, and Build Steps
142142
- id: faq-functions
143143
title: Passing Functions to Components
144144
- id: faq-state
145145
title: Component State
146146
- id: faq-styling
147-
title: Styling and CSS
147+
title: Styling CSS
148148
- id: faq-structure
149149
title: File Structure
150150
- id: faq-versioning
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: A Component Using External Plugins
2+
title: Component sử dụng plugins bên ngoài
33
order: 3
44
domid: markdown-example
55
---
66

7-
React allows you to interface with other libraries and frameworks. This example uses **remarkable**, an external Markdown library, to convert the `<textarea>`'s value in real time.
7+
React cho phép bạn giao tiếp với các thư viện và frameworks. Ví dụ này sử dụng **remarkable**, một thư viện Markdown bên ngoài, để chuyển đổi giá trị của `<textarea>` trong thời gian thực.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: A Simple Component
2+
title: Ví dụ Component
33
order: 0
44
domid: hello-example
55
---
66

7-
React components implement a `render()` method that takes input data and returns what to display. This example uses an XML-like syntax called JSX. Input data that is passed into the component can be accessed by `render()` via `this.props`.
7+
Các thành phần React thực hiện một phương thức `render ()` lấy dữ liệu đầu vào và trả về những gì sẽ hiển thị. Ví dụ này sử dụng cú pháp giống như XML có tên là JSX. Dữ liệu đầu vào được truyền vào thành phần có thể được truy cập bằng `render ()` qua `this.props`.
88

9-
**JSX is optional and not required to use React.** Try the [Babel REPL](babel://es5-syntax-example) to see the raw JavaScript code produced by the JSX compilation step.
9+
**JSX là tùy chọn và không bắt buộc phải sử dụng React.** Hãy thử [Babel REPL](babel://es5-syntax-example) để xem mã JavaScript ban đầu được tạo bởi bước biên dịch JSX.

content/home/examples/a-stateful-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ order: 1
44
domid: timer-example
55
---
66

7-
In addition to taking input data (accessed via `this.props`), a component can maintain internal state data (accessed via `this.state`). When a component's state data changes, the rendered markup will be updated by re-invoking `render()`.
7+
Ngoài việc lấy dữ liệu đầu vào (được truy cập qua `this.props`), một thành phần có thể duy trì dữ liệu trạng thái bên trong (được truy cập qua` this.state`). Khi dữ liệu trạng thái của một thành phần thay đổi, sẽ được cập nhật bằng cách gọi lại `render ()`.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: An Application
2+
title: Một ứng dụng
33
order: 2
44
domid: todos-example
55
---
66

7-
Using `props` and `state`, we can put together a small Todo application. This example uses `state` to track the current list of items as well as the text that the user has entered. Although event handlers appear to be rendered inline, they will be collected and implemented using event delegation.
7+
Sử dụng `props` ` state`, chúng ta có thể kết hợp một ứng dụng Todo nhỏ. Ví dụ này sử dụng `state` để theo dõi danh sách các mục hiện tại cũng như văn bản mà người dùng đã nhập. Mặc dù các trình xử lý sự kiện được hiển thị cùng dòng, chúng sẽ được thu thập và triển khai bằng cách sử dụng các sự kiện.

content/home/marketing/component-based.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ title: Component-Based
33
order: 1
44
---
55

6-
Build encapsulated components that manage their own state, then compose them to make complex UIs.
6+
Xây dựng các component và quản lý các trạng thái của riêng chúng, sau đó kết hợp chúng để tạo các UI phức tạp.
77

8-
Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.
8+
component logic được viết bằng JavaScript thay vì các mẫu, bạn có thể dễ dàng truyền dữ liệu phong phú qua ứng dụng của mình và tránh thao tác với DOM.

0 commit comments

Comments
 (0)