Skip to content

Commit 766a016

Browse files
yuqingchateonion
andauthored
Apply suggestions from code review
Co-Authored-By: hateonion <ouyang_yingjie@outlook.com>
1 parent 4bf7178 commit 766a016

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/docs/faq-ajax.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ category: FAQ
88

99
### 我怎样在 React 中发起 AJAX 请求{#how-can-i-make-an-ajax-call}
1010

11-
在React开发中,你能使用任何你喜欢的 AJAX 库,比如社区比较流行的 [Axios](https://github.com/axios/axios)[jQuery AJAX](https://api.jquery.com/jQuery.ajax/),或者是浏览器内置的 [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
11+
在 React 开发中,你能使用任何你喜欢的 AJAX 库,比如社区比较流行的 [Axios](https://github.com/axios/axios)[jQuery AJAX](https://api.jquery.com/jQuery.ajax/),或者是浏览器内置的 [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
1212

13-
### 我应该在 React组件的哪个生命周期函数中发起 AJAX 请求?{#where-in-the-component-lifecycle-should-i-make-an-ajax-call}
13+
### 我应该在 React 组件的哪个生命周期函数中发起 AJAX 请求?{#where-in-the-component-lifecycle-should-i-make-an-ajax-call}
1414

1515
我们推荐你在 [`componentDidMount`](/docs/react-component.html#mounting) 这个生命周期函数中发起 AJAX 请求。这样做你可以拿到 AJAX 请求返回的数据并通过 `setState` 来更新组件。
1616

0 commit comments

Comments
 (0)