Skip to content

Commit e51c6e2

Browse files
committed
tweak note
1 parent a6cbda5 commit e51c6e2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/content/blog/2025/10/01/react-19-2.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,9 @@ function ChatRoom({ roomId, theme, threadId }) {
133133
134134
<Note>
135135
136-
#### Please don't over use `useEffectEvent` {/*please-dont-over-use-useeffectevent*/}
136+
#### When to use `useEffectEvent` {/*when-to-use-useeffectevent*/}
137137
138-
We introduced `useEffectEvent` as an experimental API several years ago, and you may be curious why it took so long to ship. We've considered multiple alternatives, but all of them have different tradeoffs that can make it too easy to accidentally opt out of reactivity, especially if it is overused.
139-
140-
We're shipping `useEffectEvent` because it helps solve a common problem, but we recommend using it sparingly. In the future we'll continue to explore solutions to improve the reactive model more broadly.
138+
You should use `useEffectEvent` for functions that are conceptually "events" that happen to be fired from an Effect instead of a user event (that's what makes it an "Effect Event"). You don't need to wrap everything in `useEffectEvent`, or to use it just to silence the lint error, as this can lead to bugs.
141139
142140
</Note>
143141
@@ -146,6 +144,10 @@ For more information, see [Separating Events from Effects](/learn/separating-eve
146144
147145
---
148146
147+
### Partial Pre-render Support {/*partial-prerender-support*/}
148+
149+
---
150+
149151
### `cacheSignal` {/*cache-signal*/}
150152
151153
<RSC>

0 commit comments

Comments
 (0)