You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to utilize the Head API by exporting a Head component along with my Page Component. I always get a
ReferenceError: Head is not defined
error (emphasized for future google searches).
After some investigation i found out that Gatsby uses Fast Refresh and in the Limitations it's mentioned that
The file you’re editing might have other exports in addition to a React component. [...] Page templates must only export one default export (the page) and query as a named export.
Is the documentation of the Head API just outdated or i understand it correctly that in the current version of Gatsby the Head API is completely useless? What is the current suggested method of adding <title> and <meta> tags to a page?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I try to utilize the Head API by exporting a
Head
component along with my Page Component. I always get aerror (emphasized for future google searches).
After some investigation i found out that Gatsby uses Fast Refresh and in the Limitations it's mentioned that
Is the documentation of the Head API just outdated or i understand it correctly that in the current version of Gatsby the Head API is completely useless? What is the current suggested method of adding
<title>
and<meta>
tags to a page?edit:
Here is the relevant part from my `package.json`
Beta Was this translation helpful? Give feedback.
All reactions