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
Bug: React 18 adds empty HTML comment tags in SSR markup #24263
Comments
I believe this is intentional due to new constraints in the streaming renderer, see #21099. It’s possible we’ll find some way to avoid it, but for now it works like this. |
Upgrades Next.js to version that fixes HTML comment showing up in the browser tab title. See: - vercel/next.js#35870 - vercel/next.js#36213 - facebook/react#24263
I believe this has been fixed with #24630 ? We can close this issue? |
This includes removing the extra code to work around facebook/react#24263
Sure, do close if it works now! I think it'll still have comments in some cases but there should be fewer. |
I'll let someone else re-open a new issue if they can still reproduce this because, on my end, all my tests are passing! |
This includes removing the extra code to work around facebook/react#24263
I'm facing this issue with Next.js 13, whenever I have a |
I saw that PR #21099 mentions this is an performance optimization for SSR hydration. |
React version: 18
Steps To Reproduce
npm install
npm build
npm run start-example
react
andreact-dom
package to version 18.0Link to code example:
https://github.com/Avansai/next-multilingual
The current behavior
When injecting JSX element in localizable text, there are now empty HTML comment tags - this is new with React 18:
The expected behavior
I would expect that there are no empty HTML comment tags:
I tried to look in the release notes, and was wondering if this commit might be related?
The text was updated successfully, but these errors were encountered: