Skip to content

Sync with reactjs.org @ f2158e36 #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ Bạn có biết về hội nghị React.js ở địa phương hay khu vực c

## Upcoming Conferences {#upcoming-conferences}

### AgentConf 2022 {#agent-conf-2022}
January 27th - 30th, 2022. In-person in Dornbirn and Lech Austria

[Website](https://agent.sh/) - [Twitter](https://twitter.com/AgentConf) - [Instagram](https://www.instagram.com/teamagent/)

### React Brussels 2021 {#react-brussels-2021}
October 15, 2021 - remote event

Expand Down Expand Up @@ -43,6 +48,11 @@ November 12-14, 2021 - remote event

[Website](https://www.reactindia.io) - [Twitter](https://twitter.com/react_india) - [Facebook](https://www.facebook.com/ReactJSIndia/) - [LinkedIn](https://www.linkedin.com/showcase/14545585) - [YouTube](https://www.youtube.com/channel/UCaFbHCBkPvVv1bWs_jwYt3w/videos)

### render(ATL) 2022 {#render-atlanta-2022}
June 2-4, 2022. Atlanta, GA, USA

[Website](https://renderatl.com) - [Twitter](https://twitter.com/renderATL) - [Instagram](https://www.instagram.com/renderatl/) - [Facebook](https://www.facebook.com/renderatl/) - [LinkedIn](https://www.linkedin.com/company/renderatl)

## Past Conferences {#past-conferences}

### render(ATL) 2021 {#render-atlanta-2021}
Expand Down
3 changes: 3 additions & 0 deletions content/community/meetups.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ Bạn đã có React.js meetup tại quốc gia của bạn chưa? Thêm nó và
## Ý {#italy}
* [Milan](https://www.meetup.com/React-JS-Milano/)

## Kenya {#kenya}
* [Nairobi - Reactdevske](https://kommunity.com/reactjs-developer-community-kenya-reactdevske)

## Malaysia {#malaysia}
* [Kuala Lumpur](https://www.kl-react.com/)
* [Penang](https://www.facebook.com/groups/reactpenang/)
Expand Down
7 changes: 7 additions & 0 deletions content/community/support.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ Có rất nhiều diễn đàn online là nơi tuyệt vời để thảo luận

Mỗi cộng đồng bao gồm hàng nghìn người dùng React.

<<<<<<< HEAD
* [Cộng đồng React của DEV](https://dev.to/t/react)
* [Cộng đồng React của Hashnode](https://hashnode.com/n/reactjs)
* [Trò chuyện online với Reactiflux](https://discord.gg/reactiflux)
* [Cộng đồng React của Reddit](https://www.reddit.com/r/reactjs/)
* [Cộng đồng React của Spectrum](https://spectrum.chat/react)
=======
* [DEV's React community](https://dev.to/t/react)
* [Hashnode's React community](https://hashnode.com/n/reactjs)
* [Reactiflux online chat](https://discord.gg/reactiflux)
* [Reddit's React community](https://www.reddit.com/r/reactjs/)
>>>>>>> f2158e36715acc001c8317e20dc4f45f9e2089f3

## Tin tức {#news}

Expand Down
2 changes: 1 addition & 1 deletion content/docs/concurrent-mode-suspense.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function ProfileTimeline() {

This demo is a teaser. Don't worry if it doesn't quite make sense yet. We'll talk more about how it works below. Keep in mind that Suspense is more of a *mechanism*, and particular APIs like `fetchProfileData()` or `resource.posts.read()` in the above example are not very important. If you're curious, you can find their definitions right in the [demo sandbox](https://codesandbox.io/s/frosty-hermann-bztrp).

Suspense is not a data fetching library. It's a **mechanism for data fetching libraries** to communicate to React that *the data a component is reading is not ready yet*. React can then wait for it to be ready and update the UI. At Facebook, we use Relay and its [new Suspense integration](docs/getting-started/step-by-step-guide/). We expect that other libraries like Apollo can provide similar integrations.
Suspense is not a data fetching library. It's a **mechanism for data fetching libraries** to communicate to React that *the data a component is reading is not ready yet*. React can then wait for it to be ready and update the UI. At Facebook, we use Relay and its [new Suspense integration](https://relay.dev/docs/getting-started/step-by-step-guide/). We expect that other libraries like Apollo can provide similar integrations.

In the long term, we intend Suspense to become the primary way to read asynchronous data from components -- no matter where that data is coming from.

Expand Down
4 changes: 0 additions & 4 deletions content/docs/hooks-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -912,13 +912,9 @@ Lưu ý bạn có thể chọn giữa truyền *state* của ứng dụng xuốn

>Lưu ý
>
<<<<<<< HEAD
>Chúng tôi đề xuất [truyền `dispatch` xuống các context](#how-to-avoid-passing-callbacks-down) thay vì các callback độc lập qua prop. Cách tiếp cận bên dưới chỉ đề cập ở đây để đầy đủ và như là một cách hatch.
>
>Cũng lưu ý rằng pattern này có thể gây ra vấn đề trong [chế độ concurrent ](/blog/2018/03/27/update-on-async-rendering.html). Chúng tôi có kế hoạch cung cấp một cách làm khác hữu hiệu trong tương lai, nhưng giải pháp an toàn nhất hiện nay là luôn luôn vô hiệu hóa callback nếu một vài giá trị phụ thuộc vào thay đổi.
=======
>We recommend to [pass `dispatch` down in context](#how-to-avoid-passing-callbacks-down) rather than individual callbacks in props. The approach below is only mentioned here for completeness and as an escape hatch.
>>>>>>> 4133943e718a77f11627888db2f59f6cb7a73403

Trong vài trường hợp các biệt, bạn cần nhớ 1 callback với [`useCallback`](/docs/hooks-reference.html#usecallback) nhưng việc nhớ này không làm việc tốt bởi vì hàm bên trong bị re-create quá nhiều lần. Nếu hàm bạn nhớ là một hàm xử lý sự kiện và không được sử dụng trong quá trình render, bạn có thể sử dụng [ref như một biến instance](#is-there-something-like-instance-variables), và lưu giá trị lần commit sau cùng một cách thủ công:

Expand Down
2 changes: 2 additions & 0 deletions content/tutorial/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ Hãy `map` mảng `history` trong phương thức `render` của Game component:
**[Xem code chi tiết tại bước này](https://codepen.io/gaearon/pen/EmmGEa?editors=0010)**

Với mỗi lịch sử bước đi trong game tic-tac-toe, ta tạo ra một danh sách các `<li>` chứa một `<button>`. Button sẽ có một hàm xử lý `onClick`, hàm này sẽ gọi phương thức `this.jumpTo()`. Hiện tại ta chưa có hàm `jumpTo()`. Đến bước này, bạn sẽ thấy một danh sách các bước đi được hiển thị trên màn hình và cảnh báo trong console của công cụ cho nhà phát triển với thông điệp như sau:

Khi chúng ta loop qua mảng `history`, `step` biến này ánh xạ tới value của element `history`. Và `move` ánh xạ tới `history` element index. Chúng ta chỉ quan tâm tới `move` ở đây, vì thế `step` sẽ không được gán.

> Warning:
Expand Down Expand Up @@ -1146,6 +1147,7 @@ Tiếp theo, chúng ta sẽ định nghĩa hàm `jumpTo` trong Game component đ
// this method has not changed
}
```
Notice in `jumpTo` method, we haven't updated history property of the state. That is because state updates are merged or in more simple words react will update only the properties mentioned in `setState` method leaving the remaining state as that is. For more info **[see the documentation](https://reactjs.org/docs/state-and-lifecycle.html#state-updates-are-merged)**

Bây giờ ta sẽ cần thay đổi hàm `handleClick` của Game component một chút.

Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@
"yarn": "^1.3.2"
},
"homepage": "https://reactjs.org/",
"keywords": [
"gatsby"
],
"keywords": [],
"license": "CC",
"main": "n/a",
"repository": {
Expand All @@ -73,6 +71,7 @@
},
"scripts": {
"build": "gatsby clean && gatsby build",
"build-ci": "gatsby clean && gatsby build",
"check-all": "npm-run-all prettier generate-ids --parallel lint flow",
"ci-check": "npm-run-all prettier:diff --parallel lint flow",
"dev": "gatsby develop -H 0.0.0.0",
Expand Down