Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeD3 committed Jul 24, 2023
1 parent 5b056d0 commit 7056513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hooks/src/useCreation/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nav:

`useCreation``useMemo``useRef` 的替代品。

因为 `useMemo` 不能保证被 memo 的值一定不会被重计算,而 `useCreation` 可以保证这一点。以下为 React 官方文档中的介绍:
因为 `useMemo` 不能保证被 memo 的值一定不会被重新计算,而 `useCreation` 可以保证这一点。以下为 React 官方文档中的介绍:

> **You may rely on useMemo as a performance optimization, not as a semantic guarantee.** In the future, React may choose to “forget” some previously memoized values and recalculate them on next render, e.g. to free memory for offscreen components. Write your code so that it still works without `useMemo` — and then add it to optimize performance.
Expand Down

0 comments on commit 7056513

Please sign in to comment.