Skip to content

Commit

Permalink
Update content/docs/hooks-overview.md
Browse files Browse the repository at this point in the history
Co-Authored-By: yesmeck <yesmeck@gmail.com>
  • Loading branch information
yuqingc and yesmeck committed Mar 20, 2019
1 parent 192667c commit 853e7dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/docs/hooks-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ React 内置了一些像 `useState` 这样的 Hooks。你也可以创建你自
## ⚡️ Effect Hook {#effect-hook}

你之前可能已经在 React 组件中执行过数据获取、订阅或者手动修改过 DOM。我们统一把这些操作称为“副作用(side-effects)”,或者简称为“作用(effects)”。
你之前可能已经在 React 组件中执行过数据获取、订阅或者手动修改过 DOM。我们统一把这些操作称为“副作用”,或者简称为“作用”。

`useEffect` 就是一个 Effect Hook,给函数组件增加了操作副作用的能力。它跟 class 组件中的 `componentDidMount``componentDidUpdate``componentWillUnmount` 具有相同的用途,只不过被合并成了一个 API。(我们会在[使用 Effect Hook](/docs/hooks-effect.html) 里展示对比 `useEffect` 和这些方法的例子。)

Expand Down

0 comments on commit 853e7dd

Please sign in to comment.