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

docs: fix next/script example causing hydration errors #63401

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

huozhi
Copy link
Member

@huozhi huozhi commented Mar 18, 2024

Related #51242

React will error In HTML, <script> cannot be a child of <html>. This will cause a hydration error. when script is rendered under html directly. The examples in our docs are causing this hydration error. Moving it under body tag will fix the hydration error

Closes NEXT-2834

@delbaoliveira delbaoliveira merged commit 049d127 into canary Mar 18, 2024
29 of 33 checks passed
@delbaoliveira delbaoliveira deleted the docs/fix-script-hydration-error branch March 18, 2024 14:36
@github-actions github-actions bot added the locked label Apr 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js team PRs by the Next.js team. locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants