Skip to content

Sync with reactjs.org @ cb5a61cd #42

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 5 commits into from
Jun 29, 2019
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
4 changes: 3 additions & 1 deletion content/docs/hooks-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,14 +610,16 @@ function ProductPage({ productId }) {

This also allows you to handle out-of-order responses with a local variable inside the effect:

```js{2,6,8}
```js{2,6,10}
useEffect(() => {
let ignore = false;
async function fetchProduct() {
const response = await fetch('http://myapi/product/' + productId);
const json = await response.json();
if (!ignore) setProduct(json);
}

fetchProduct();
return () => { ignore = true };
}, [productId]);
```
Expand Down
2 changes: 1 addition & 1 deletion content/docs/thinking-in-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Vì mô hình dữ liệu thường hiển thị dưới dạng chuỗi JSON, n

![Sơ đồ Component](../images/blog/thinking-in-react-components.png)

Trong ứng dụng đơn giản dưới đây, bạn sẽ thấy chúng ta có 5 component, dữ liệu mà mỗi component hiển thị sẽ được in nghiêng
Trong ứng dụng dưới đây, bạn sẽ thấy chúng ta có 5 component, dữ liệu mà mỗi component hiển thị sẽ được in nghiêng

1. **`FilterableProductTable` (orange):** chứa toàn bộ cả ứng dụng
2. **`SearchBar` (blue):** nơi *người dùng nhập từ khoá tìm kiếm*
Expand Down