Open ChristianIvicevic opened 1 year ago
This isn't related to the app directory, it's the same with next/head
. In fact, the error message is displayed by React, not Next. The issue likely surfaced after upgrading the React version to use the app directory.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Head component/file (next/head / head.js)
Link to the code that reproduces this issue
https://github.com/ChristianIvicevic/next-appdir-title-children-repro
To Reproduce
/src/app/head.tsx
Append a custom variable to the title such as this
Describe the Bug
Title is not rendered as expected and falls back to next parent title. Throws the following "warning":
Expected Behavior
Title renders as
Foo - Create Next App
.A possible workaround is to interpolate using something like this:
This is however inconvenient for adding HTML entities such as
—
instead of the hyphen which would work otherwise when just writing this for example:Which browser are you using? (if relevant)
n/a
How are you deploying your application? (if relevant)
n/a