Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/reference/react/useMemo.md
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ function ChatRoom({ roomId }) {
const connection = createConnection(options);
connection.connect();
return () => connection.disconnect();
}, [options]); // ✅ Only changes when createOptions changes
}, [options]); // ✅ Only changes when create options changes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be "Only changes when options changes"? What is create options?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, line 1104 const options = createOptions(); should be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,thankyou

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check #7335
@ZhenyaGoroh @lukahartwig
Thank you all

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check #7335 @ZhenyaGoroh @lukahartwig Thank you all

I left the comment. Also I'd suggest to commit changed to this pr instead of creating a new one.

// ...
```

Expand Down
Loading