Skip to content

Commit

Permalink
Line36-mistake
Browse files Browse the repository at this point in the history
当前状态为:- `mountCallback`会保存`回调函数`果作为`value`保存。

错误描述:行文词不达意,略有模糊。作者本人原意为:“会将`回调函数`作为`value`保存”,但却多了“果”字。

建议更改为:- `mountCallback`会将`回调函数`作为`value`保存。
  • Loading branch information
xiazhaohui authored Oct 10, 2021
1 parent 5b06c70 commit 1df3ef9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/hooks/usememo.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function mountCallback<T>(callback: T, deps: Array<mixed> | void | null): T {

- `mountMemo`会将`回调函数`(nextCreate)的执行结果作为`value`保存

- `mountCallback`会保存`回调函数`果作为`value`保存
- `mountCallback`会将`回调函数`作为`value`保存

## update

Expand Down Expand Up @@ -86,4 +86,4 @@ function updateCallback<T>(callback: T, deps: Array<mixed> | void | null): T {
}
```

可见,对于`update`,这两个`hook`的唯一区别也是**是回调函数本身还是回调函数的执行结果作为value**
可见,对于`update`,这两个`hook`的唯一区别也是**是回调函数本身还是回调函数的执行结果作为value**

0 comments on commit 1df3ef9

Please sign in to comment.