Skip to content

Commit

Permalink
docs: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiboss committed Aug 22, 2024
1 parent cdafee2 commit 02b7fbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/docs/en/docs/guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ const dynamicResult = useCreation(() => doHeavyWorkToCreate(), [dependency])

If you need to encapsulate a custom Hook, or require more advanced features, please refer to the following advanced guide.

### useStableFu \{#use-stable-fn}
### useStableFn \{#use-stable-fn}

`useStableFn` is used to ensure the stability of function references, suitable for scenarios where it is necessary to keep function references stable, such as callbacks passed to child components. Functions exposed by Hooks should ideally be wrapped with `useStableFn`.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/zh-cn/docs/guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ const dynamicResult = useCreation(() => doHeavyWorkToCreate(), [dependency])

如果你需要封装自定义 Hook,或者需要更多高级功能,可以参考以下进阶指引。

### useStabelFn \{#use-stable-fn}
### useStableFn \{#use-stable-fn}

`useStableFn` 用于确保函数引用稳定,适用于需要确保函数引用稳定的场景,例如传递给子组件的回调函数,通常 Hooks 暴露的函数最好使用 `useStableFn` 包裹。

Expand Down

0 comments on commit 02b7fbb

Please sign in to comment.