Skip to content

Commit 9dc6aa6

Browse files
committed
modify hooks overview
1 parent 07a12a4 commit 9dc6aa6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

content/docs/hooks-overview.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ next: hooks-state.html
66
prev: hooks-intro.html
77
---
88

9-
*Hook* 是 React 16.8 的新增特性。它可以让你在不使用 class 的情况下使用 state 和一些其他的 React 特性。
9+
*Hook* 是 React 16.8 的新增特性。它可以让你在不编写 class 的情况下使用 state 以及其他的 React 特性。
1010

1111
Hook 是[向下兼容的](/docs/hooks-intro.html#no-breaking-changes)。本页面为有经验的 React 用户提供一个对 Hook 的概览。这是一个相当快速的概览,如果你有疑惑,可以参阅下面这样的黄色提示框。
1212

@@ -201,10 +201,11 @@ function useFriendStatus(friendID) {
201201
}
202202
```
203203

204-
它将 `friendID` 作为参数,并返回该好友是否在线
204+
它将 `friendID` 作为参数,并返回该好友是否在线
205205

206206
现在我们可以在两个组件中使用它:
207207

208+
208209
```js{2}
209210
function FriendStatus(props) {
210211
const isOnline = useFriendStatus(props.friend.id);

0 commit comments

Comments
 (0)