Skip to content

Commit 4daebb4

Browse files
authoredMar 19, 2019
Update hooks-rules.md
1 parent 1b3fb38 commit 4daebb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎content/docs/hooks-rules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ useEffect(updateTitle) // 4. Replace the effect for updating the title
108108
}
109109
```
110110

111-
在第一次渲染中 `name !== ''` 这个条件值为 `true`,所以我们会执行这个 Hook。但是下一次渲染时我们可能清空了表单,表达式值变为 `false`现在我们在渲染时跳过了这个 Hook,Hook 的调用顺序变得不同了
111+
在第一次渲染中 `name !== ''` 这个条件值为 `true`,所以我们会执行这个 Hook。但是下一次渲染时我们可能清空了表单,表达式值变为 `false`此时的渲染会跳过该 Hook,Hook 的调用顺序发生了改变
112112

113113
```js
114114
useState('Mary') // 1. Read the name state variable (argument is ignored)

0 commit comments

Comments
 (0)