Skip to content

Commit cd336d9

Browse files
blade254353074QC-L
authored andcommitted
docs(cn): modify semantic errors in content/docs/hooks-faq.md (reactjs#252)
语义不太对,原文是 the alert will show the count variable at the time you clicked the “Show alert” button. 意思是 alert 会显示点击按钮时的 count 变量,而不是「 alert 会 在你点击『Show alert』按钮时 显示 count 变量」
1 parent f8d4688 commit cd336d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/hooks-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ function Example() {
399399
}
400400
```
401401

402-
如果你先点击「Show alert」然后增加计数器的计数,那这个 alert **在你点击『Show alert』按钮时** 显示 `count` 变量。这避免了那些因为假设 props 和 state 没有改变的代码引起问题。
402+
如果你先点击「Show alert」然后增加计数器的计数,那这个 alert 会显示**在你点击『Show alert』按钮时** `count` 变量。这避免了那些因为假设 props 和 state 没有改变的代码引起问题。
403403

404404
如果你刻意地想要从某些异步回调中读取 *最新的* state,你可以用 [一个 ref](/docs/hooks-faq.html#is-there-something-like-instance-variables) 来保存它,修改它,并从中读取。
405405

0 commit comments

Comments
 (0)