Open koenpunt opened 2 years ago
Also experiencing this
A temporary fix:
<title>{`${post.title} | Website Name`}</title>
🤷♂️
2023 and still have this issue
Same thing on next@13.2.4
with swcMinify: true
.
The interpolation trick from @andersonba helps.
The problem comes from ReactDOMServer https://github.com/facebook/react/blob/4a1cc2ddd035f5c269e82ab6f7686e2e60d3b3ea/packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js#L1962 and I see nothing that can be done to suppress this warning (other that getting around it with hacks like the one above).
The problem comes from ReactDOMServer
The error is thrown there. However I believe the problem is Next specific, so the rendering of Next might be messing up proving the document to the renderer?
Verify canary release
Provide environment information
$ npx next info
What browser are you using? (if relevant)
Chome
How are you deploying your application? (if relevant)
No response
Describe the Bug
I have a page title set like this
But with Next 13 it renders like so:
And prints the following warning in the terminal:
Expected Behavior
It renders without the comment:
And no warning.
Link to reproduction
https://github.com/koenpunt/nextjs13-title-issue
To Reproduce
Run the reproduction application and you'll see the warning when opening http://localhost:3000/example