Skip to content

Commit 20d804e

Browse files
authored
Update useEffectEvent.md with usage section
1 parent ff6717b commit 20d804e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/reference/react/useEffectEvent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function ChatRoom({ roomId, theme }) {
6767
- **不是依赖数组的捷径**:不要用 `useEffectEvent` 来避免在 Effect 的依赖数组中声明依赖。这可能会隐藏 bug 并让代码更难理解。更推荐显式依赖,或使用 ref 来比较之前的值。
6868
- **用于非响应式逻辑**:仅在逻辑不依赖变化的值时使用 `useEffectEvent` 来提取。
6969

70-
---
70+
___
7171

7272
## 用法 {/*usage*/}
7373

0 commit comments

Comments
 (0)