Skip to content

Commit e2d9fd7

Browse files
Fix wrong documentation for effect events (#7800)
* Fix wrong documentation for effect events * Update src/content/learn/separating-events-from-effects.md --------- Co-authored-by: Ricky <rickhanlonii@gmail.com>
1 parent a73055f commit e2d9fd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/learn/separating-events-from-effects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function ChatRoom({ roomId, theme }) {
439439
// ...
440440
```
441441
442-
This solves the problem. Note that you had to *remove* `onConnected` from the list of your Effect's dependencies. **Effect Events are not reactive and must be omitted from dependencies.**
442+
This solves the problem. Note that you had to *remove* `theme` from the list of your Effect's dependencies, because it's no longer used in the Effect. You also don't need to *add* `onConnected` to it, because **Effect Events are not reactive and must be omitted from dependencies.**
443443
444444
Verify that the new behavior works as you would expect:
445445

0 commit comments

Comments
 (0)