Skip to content

Commit 6d65700

Browse files
Merge branch 'dev' of https://github.com/hoangvanhoa1701/vi.reactjs.org into translate/community
# Conflicts: # content/community/examples.md # content/community/meetups.md
2 parents 50ecaa7 + ad02e1f commit 6d65700

Some content is hidden

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

54 files changed

+1068
-1070
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.cache
22
.DS_STORE
33
.idea
4+
.history
45
node_modules
56
public
67
yarn-error.log

content/blog/2013-06-05-why-react.md

Lines changed: 51 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,63 @@
11
---
2-
title: Why did we build React?
2+
title: Tại sao chúng tôi xây dựng React?
33
author: [petehunt]
44
---
55

6-
There are a lot of JavaScript MVC frameworks out there. Why did we build React
7-
and why would you want to use it?
6+
Có rất nhiều thư viện JavaScript MVC. Tại sao chúng tôi xây dựng React và tại sao bạn muốn sử dụng nó?
87

9-
## React isn't an MVC framework. {#react-isnt-an-mvc-framework}
8+
## React không phải là một MVC framework. {#react-isnt-an-mvc-framework}
109

11-
React is a library for building composable user interfaces. It encourages
12-
the creation of reusable UI components which present data that changes over
13-
time.
10+
React là một thư viện để xây dựng giao diện người dùng. Nó khuyến khích việc tạo ra các thành phần giao diện người dùng có thể tái sử dụng, hiển thị dữ liệu thay đổi theo thời gian.
1411

1512
## React doesn't use templates. {#react-doesnt-use-templates}
1613

17-
Traditionally, web application UIs are built using templates or HTML directives.
18-
These templates dictate the full set of abstractions that you are allowed to use
19-
to build your UI.
20-
21-
React approaches building user interfaces differently by breaking them into
22-
**components**. This means React uses a real, full featured programming language
23-
to render views, which we see as an advantage over templates for a few reasons:
24-
25-
- **JavaScript is a flexible, powerful programming language** with the ability
26-
to build abstractions. This is incredibly important in large applications.
27-
- By unifying your markup with its corresponding view logic, React can actually
28-
make views **easier to extend and maintain**.
29-
- By baking an understanding of markup and content into JavaScript, there's
30-
**no manual string concatenation** and therefore less surface area for XSS
31-
vulnerabilities.
32-
33-
We've also created [JSX](/docs/jsx-in-depth.html), an optional syntax
34-
extension, in case you prefer the readability of HTML to raw JavaScript.
35-
36-
## Reactive updates are dead simple. {#reactive-updates-are-dead-simple}
37-
38-
React really shines when your data changes over time.
39-
40-
In a traditional JavaScript application, you need to look at what data changed
41-
and imperatively make changes to the DOM to keep it up-to-date. Even AngularJS,
42-
which provides a declarative interface via directives and data binding [requires
43-
a linking function to manually update DOM nodes](https://code.angularjs.org/1.0.8/docs/guide/directive#reasonsbehindthecompilelinkseparation).
44-
45-
React takes a different approach.
46-
47-
When your component is first initialized, the `render` method is called,
48-
generating a lightweight representation of your view. From that representation,
49-
a string of markup is produced, and injected into the document. When your data
50-
changes, the `render` method is called again. In order to perform updates as
51-
efficiently as possible, we diff the return value from the previous call to
52-
`render` with the new one, and generate a minimal set of changes to be applied
53-
to the DOM.
54-
55-
> The data returned from `render` is neither a string nor a DOM node -- it's a
56-
> lightweight description of what the DOM should look like.
57-
58-
We call this process **reconciliation**. Check out
59-
[this jsFiddle](http://jsfiddle.net/2h6th4ju/) to see an example of
60-
reconciliation in action.
61-
62-
Because this re-render is so fast (around 1ms for TodoMVC), the developer
63-
doesn't need to explicitly specify data bindings. We've found this approach
64-
makes it easier to build apps.
65-
66-
## HTML is just the beginning. {#html-is-just-the-beginning}
67-
68-
Because React has its own lightweight representation of the document, we can do
69-
some pretty cool things with it:
70-
71-
- Facebook has dynamic charts that render to `<canvas>` instead of HTML.
72-
- Instagram is a "single page" web app built entirely with React and
73-
`Backbone.Router`. Designers regularly contribute React code with JSX.
74-
- We've built internal prototypes that run React apps in a web worker and use
75-
React to drive **native iOS views** via an Objective-C bridge.
76-
- You can run React
77-
[on the server](https://github.com/petehunt/react-server-rendering-example)
78-
for SEO, performance, code sharing and overall flexibility.
79-
- Events behave in a consistent, standards-compliant way in all browsers
80-
(including IE8) and automatically use
14+
Theo truyền thống, giao diện người dùng ứng dụng web được xây dựng bằng cách sử dụng các templates hoặc HTML.
15+
Các templates này quy định tập hợp đầy đủ các phần tóm tắt mà bạn được phép sử dụng để xây dựng giao diện người dùng của mình.
16+
17+
React tiếp cận việc xây dựng các giao diện người dùng theo cách chia nhỏ chúng thành các
18+
**components**. Điều này có nghĩa là React sử dụng một ngôn ngữ lập trình, đầy đủ tính năng để hiển thị các chế độ xem, mà chúng tôi coi là một lợi thế hơn so với các templates vì một số lý do:
19+
20+
- **JavaScript là một ngôn ngữ lập trình linh hoạt, mạnh mẽ** với khả năng xây dựng sự trừu tượng. Điều này cực kỳ quan trọng trong các ứng dụng lớn.
21+
- Bằng cách thống nhất đánh dấu của bạn với logic chế độ xem tương ứng của nó, React thực sự có thể tạo các chế độ xem **dễ dàng mở rộng và bảo trì hơn**.
22+
- Bằng cách đưa hiểu biết về markup và content vào JavaScript,
23+
**không có quá trình nối chuỗi thủ công** và do đó ít diện tích bề mặt hơn cho các lỗ hổng XSS.
24+
25+
Chúng tôi cũng đã tạo [JSX](/docs/jsx-in-depth.html), một phần mở rộng cú pháp tùy chọn, trong trường hợp bạn thích khả năng đọc của HTML hơn JavaScript thô.
26+
27+
## Cập nhật phản ứng rất đơn giản {#reactive-updates-are-dead-simple}
28+
29+
React thực sự nổi bật khi dữ liệu của bạn thay đổi theo thời gian.
30+
31+
Trong một ứng dụng JavaScript truyền thống, bạn cần xem dữ liệu nào đã thay đổi và thực hiện các thay đổi theo thứ bậc đối với DOM để luôn cập nhật. Ngay cả AngularJS, cung cấp giao diện khai báo thông qua các chỉ thị và liên kết dữ liệu [yêu cầu một chức năng liên kết để cập nhật các nút DOM theo cách thủ công.](https://code.angularjs.org/1.0.8/docs/guide/directive#reasonsbehindthecompilelinkseparation).
32+
33+
React có một cách tiếp cận khác.
34+
35+
Khi component của bạn được khởi tạo lần đầu tiên, phương thức `render` được gọi,
36+
nó tạo ra 1 phiên bản UI rất nhỏ. Từ phiên bản này, nó sẽ tạo thành 1 chuỗi html(markup) và cập nhật(replace?) document hiện tại. Mỗi khi dữ liệu(prop, …) của app thay đổi, phương thức `render` lại được gọi lại. Để quá trình re-render và update lại dom hiệu quả nhất, chúng tôi check sự thay đổi giữa lần thay đổi trước và sau `render`, và chỉ lấy ra đoạn code đã thay đổi và cập nhật lại DOM (không cập nhật lại toàn bộ)
37+
38+
39+
> Dữ liệu sinh ra sau quá trình `render` không hẳn là 1 chuỗi hay là 1 DOM node cụ thể, nó là 1 dạng tập hợp các mô tả về DOM.
40+
41+
Chúng tôi gọi quá trình này là **reconciliation**. Tham khảo
42+
[this jsFiddle](http://jsfiddle.net/2h6th4ju/) này để xem ví dụ về
43+
reconciliation trong thực tế.
44+
45+
Vì quá trình kết xuất này quá nhanh (khoảng 1ms đối với TodoMVC), nhà phát triển không cần chỉ định rõ ràng các ràng buộc dữ liệu. Chúng tôi nhận thấy cách tiếp cận này giúp tạo ứng dụng dễ dàng hơn.
46+
47+
## HTML chỉ là sự khởi đầu {#html-is-just-the-beginning}
48+
49+
Bởi vì React có bản trình bày tài liệu gọn nhẹ của riêng nó, chúng ta có thể thực hiện một số điều khá thú vị với nó:
50+
51+
- Facebook có các biểu đồ động hiển thị dưới dạng `<canvas>` thay vì HTML.
52+
- Instagram là một ứng dụng web "một trang" được xây dựng hoàn toàn bằng React và `Backbone.Router`. Các nhà thiết kế thường xuyên đóng góp mã React với JSX.
53+
- Chúng tôi đã xây dựng internal prototypes để chạy các ứng dụng React trong web worker và sử dụng React để thúc đẩy **native iOS views** qua một Objective-C
54+
- Bạn có thể chạy React
55+
[trên máy chủ](https://github.com/petehunt/react-server-rendering-example)
56+
để SEO, hiệu suất, chia sẻ mã và tính linh hoạt tổng thể.
57+
- Các sự kiện hoạt động theo cách nhất quán, tuân thủ tiêu chuẩn trong tất cả các trình duyệt (bao gồm cả IE8) và tự động sử dụng
8158
[event delegation](http://davidwalsh.name/event-delegate).
8259

83-
Head on over to [https://reactjs.org](https://reactjs.org) to check out what we have
84-
built. Our documentation is geared towards building apps with the framework,
85-
but if you are interested in the nuts and bolts
86-
[get in touch](/support.html) with us!
60+
Truy cập [https://reactjs.org](https://reactjs.org) để kiểm tra những gì chúng tôi đã xây dựng. Tài liệu của chúng tôi hướng tới việc xây dựng ứng dụng với framework, nhưng nếu bạn quan tâm đến những chi tiết cần thiết
61+
[liên hệ](/support.html) với chúng tôi!
8762

88-
Thanks for reading!
63+
Cảm ơn vì đã đọc!

content/blog/2013-07-26-react-v0-4-1.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ title: "React v0.4.1"
33
author: [zpao]
44
---
55

6-
React v0.4.1 is a small update, mostly containing correctness fixes. Some code has been restructured internally but those changes do not impact any of our public APIs.
6+
React v0.4.1 là một thay đổi nhỏ, hầu hết bao gồm các bản sửa lỗi về tính đúng đắn. Một số đoạn mã đã được cấu trúc lại bên trong nhưng những thay đổi đó không ảnh hưởng đến bất kỳ API công khai nào của chúng tôi.
77

88

99
## React {#react}
1010

11-
* `setState` callbacks are now executed in the scope of your component.
12-
* `click` events now work on Mobile Safari.
13-
* Prevent a potential error in event handling if `Object.prototype` is extended.
14-
* Don't set DOM attributes to the string `"undefined"` on update when previously defined.
15-
* Improved support for `<iframe>` attributes.
16-
* Added checksums to detect and correct cases where server-side rendering markup mismatches what React expects client-side.
11+
* `setState` callback hiện đã có thể được thực thi trong phạm vi component của bạn.
12+
* `click` event hiện đã hoạt động trên Mobile Safari.
13+
* Ngăn lỗi tiềm ẩn trong xử lý sự kiện nếu `Object.prototype` được mở rộng.
14+
* Không đặt thuộc tính DOM thành chuỗi `"undefined"` trong lúc cập nhật khi được định nghĩa trước đó.
15+
* Cải thiện hỗ trợ cho các thuộc tính `<iframe>`.
16+
* Đã thêm checksum để phát hiện và sửa các trường hợp mà server-side hiển thị markup không khớp với những gì React mong đợi ở phía client-side.
1717

1818

1919
## JSXTransformer {#jsxtransformer}
2020

21-
* Improved environment detection so it can be run in a non-browser environment.
21+
* Cải thiện khả năng phát hiện môi trường để nó có thể chạy trong môi trường không có trình duyệt.
2222

2323

24-
[Download it now!](/downloads.html)
24+
[Tải xuống ngay bây giờ!](/downloads.html)

content/blog/2013-10-29-react-v0-5-1.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ title: "React v0.5.1"
33
author: [zpao]
44
---
55

6-
This release focuses on fixing some small bugs that have been uncovered over the past two weeks. I would like to thank everybody involved, specifically members of the community who fixed half of the issues found. Thanks to [Sophie Alpert][1], [Andrey Popp][2], and [Laurence Rowe][3] for their contributions!
6+
Bản phát hành này tập trung vào việc sửa một số lỗi nhỏ đã được phát hiện trong hai tuần qua. Tôi muốn cảm ơn tất cả những người đã tham gia, đặc biệt là các thành viên của cộng đồng, họ đã khắc phục một nửa số vấn đề được tìm thấy. Cảm ơn tới [Sophie Alpert][1], [Andrey Popp][2], [Laurence Rowe][3] vì những đóng góp của họ!
77

8-
## Changelog {#changelog}
8+
## Nhật ký thay đổi {#changelog}
99

1010
### React {#react}
1111

12-
* Fixed bug with `<input type="range">` and selection events.
13-
* Fixed bug with selection and focus.
14-
* Made it possible to unmount components from the document root.
15-
* Fixed bug for `disabled` attribute handling on non-`<input>` elements.
12+
* Đã sửa lỗi `<input type="range">` và các sự kiện selection.
13+
* Đã sửa lỗi selection focus.
14+
* Đã có thể unmount component từ document root.
15+
* Đã sửa lỗi thuộc tính `disabled` xử lý trên các phần tử không phải`<input>`.
1616

17-
### React with Addons {#react-with-addons}
17+
### React với các Addon {#react-with-addons}
1818

19-
* Fixed bug with transition and animation event detection.
19+
* Đã sửa lỗi transition và phát hiện sự kiện animation.
2020

2121
[1]: https://github.com/sophiebits
2222
[2]: https://github.com/andreypopp

content/blog/2018-10-23-react-v-16-6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Refer to the documentation for [detailed installation instructions](/docs/instal
119119
## Changelog {#changelog}
120120

121121
### React {#react}
122-
122+
123123
* Add `React.memo()` as an alternative to `PureComponent` for functions. ([@acdlite](https://github.com/acdlite) in [#13748](https://github.com/facebook/react/pull/13748))
124124
* Add `React.lazy()` for code splitting components. ([@acdlite](https://github.com/acdlite) in [#13885](https://github.com/facebook/react/pull/13885))
125125
* `React.StrictMode` now warns about legacy context API. ([@bvaughn](https://github.com/bvaughn) in [#13760](https://github.com/facebook/react/pull/13760))

content/community/examples.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ sectionid: community
66
permalink: community/examples.html
77
---
88

9-
Có rất nhiều dự án mẫu được tạo bởi cộng đồng React. Chúng tôi đang giữ cho trang này tập trung vào những trang sử dụng React mà không có sử dụng thư viện state management của bên thứ ba.
9+
Có rất nhiều dự án mẫu được tạo bởi cộng đồng React. Chúng tôi đang duy trì trang này chỉ tập trung vào những dự án sử dụng React mà không có thư viện quản lý state của bên thứ ba.
1010

11-
Nếu bạn thêm một dự án, hãy cam kết cập nhật dự án đó với các phiên bản React mới nhất.
11+
Nếu bạn thêm một dự án, hãy cam kết cập nhật với các phiên bản React mới nhất.
1212

1313
## Các dự án mẫu cỡ nhỏ {#small-examples}
1414

15-
* **[Calculator](https://github.com/ahfarmer/calculator)** Triển khai xây dựng máy tính iOS với React.
16-
* **[Emoji Search](https://github.com/ahfarmer/emoji-search)** Ứng dụng React dùng để tìm kiếm biểu tượng cảm xúc.
17-
* **[Snap Shot](https://github.com/Yog9/SnapShot)** Một bộ sưu tập ảnh với tính năng tìm kiếm.
18-
* **[BMI Calculator](https://github.com/GermaVinsmoke/bmi-calculator)** Một ứng dụng React Hooks dùng để tính chỉ số BMI.
19-
* **[Image Compressor](https://github.com/RaulB-masai/react-image-compressor)** Một trình nén hình ảnh ngoại tuyến được xây dựng với React và browser-image-compression.
20-
* **[Counter App](https://github.com/arnab-datta/counter-app)** Một ví dụ về giỏ hàng.
21-
* **[Tutorial Solutions](https://github.com/harman052/react-tutorial-solutions)** Những giải pháp cho những thách thức được đề cập ở cuối hướng dẫn của React.
15+
* **[Calculator](https://github.com/ahfarmer/calculator)** Triển khai máy tính iOS xây dựng bằng React
16+
* **[Emoji Search](https://github.com/ahfarmer/emoji-search)** Ứng dụng React tìm kiếm biểu tượng cảm xúc
17+
* **[Snap Shot](https://github.com/Yog9/SnapShot)** Một thư viện ảnh với tính năng tìm kiếm
18+
* **[BMI Calculator](https://github.com/GermaVinsmoke/bmi-calculator)** Một ứng dụng React Hooks để tính chỉ số BMI
19+
* **[Image Compressor](https://github.com/RaulB-masai/react-image-compressor)** Một trình nén ảnh ngoại tuyến được xây dựng với React và browser-image-compression
20+
* **[Counter App](https://github.com/arnab-datta/counter-app)** Một ví dụ nhỏ về giỏ hàng
21+
* **[Tutorial Solutions](https://github.com/harman052/react-tutorial-solutions)** Giải pháp cho những thách thức được đề cập ở cuối hướng dẫn React
2222

2323
## Ứng dụng hoàn chỉnh {#complete-apps}
2424

25-
* **[Builder Book](https://github.com/builderbook/builderbook)** đây là một ứng dụng web mã nguồn mở để viết và lưu trữ tài liệu hoặc bán sách. Được xây dựng với React, Material-UI, Next, Express, Mongoose, MongoDB.
25+
* **[Builder Book](https://github.com/builderbook/builderbook)** Ứng dụng web mã nguồn mở để viết và lưu trữ tài liệu hoặc bán sách. Được xây dựng với React, Material-UI, Next, Express, Mongoose, MongoDB

content/community/meetups.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
id: meetups
3-
title: Các cuộc gặp gỡ trên khắp thế giới
3+
title: Meetups Around the World
44
layout: community
55
sectionid: community
66
permalink: community/meetups.html
77
---
88

9-
Bạn có một buổi chia sẻ hay họp mặt về React.js ở khu vực của bạn không? Hãy thêm nó vào đây! (Và vui lòng hãy giữ nguyên danh sách theo thứ tự bảng chữ cái)
9+
Bạn đã có React.js meetup tại quốc gia của bạn chưa? Thêm nó vào đây! (Vui lòng giữ danh sách theo thứ tự bảng chữ cái)
1010

1111
## Albania {#albania}
1212
* [Tirana](https://www.meetup.com/React-User-Group-Albania/)

0 commit comments

Comments
 (0)