NextHead in _document makes the page load forever #65082
Unanswered
vladimirtomic-smg
asked this question in
Help
Replies: 1 comment
-
Hi,
Interactivity and other stuff are not possible from Also:
A better place to do this, would be |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
We have a custom
Head
component which is wrappingNextHead
. It looks like this:We need to have the same title on each page, so I just I tried putting it in
src/pages/_document.page.tsx
:However, our app stopped working after this. The page was just showing a spinner, and nothing was happening. Nothing in the console, nothing suspicious in the Network tab (apart from a request staying in the "pending" state forever).
Then I reverted the
_document
file and made it look like this:...and I put our custom
Head
component in every individual page, for example:After this, everything started working normally, and every page had a proper title.
What could be the problem with putting this
NextHead
component in_document
?Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions