Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code example mistake in useMemo page #7319

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JZZICK
Copy link
Contributor

@JZZICK JZZICK commented Dec 3, 2024

No description provided.

Copy link

vercel bot commented Dec 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
19-react-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 2:30pm
react-dev ✅ Ready (Inspect) Visit Preview Dec 3, 2024 2:30pm

Copy link

github-actions bot commented Dec 3, 2024

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@JZZICK
Copy link
Contributor Author

JZZICK commented Dec 3, 2024

#7252

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants