Skip to content

Commit b681655

Browse files
authored
Update reference-react-component.md
reference facebook/react#9117
1 parent 44528e2 commit b681655

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/reference-react-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ constructor(props) {
194194
componentDidMount()
195195
```
196196
197-
`componentDidMount()` 会在组件挂载后(插入 DOM 树中)立即调用。依赖于 DOM 节点的初始化应该放在这里。如需通过网络请求获取数据,此处是实例化请求的好地方。
197+
`componentDidMount()` 会在组件挂载后(在他自己的容器中挂载完成了,并不代表已经挂载到DOM树)立即调用。依赖于 DOM 节点的初始化应该放在这里。如需通过网络请求获取数据,此处是实例化请求的好地方。
198198

199199
这个方法是比较适合添加订阅的地方。如果添加了订阅,请不要忘记在 `componentWillUnmount()` 里取消订阅
200200

0 commit comments

Comments
 (0)