How to really have a static page without hydration? #29352
Unanswered
ZelphirKaltstahl
asked this question in
Help
Replies: 1 comment 1 reply
-
What you are seeing is expected because it is the result of
Gatsby doesn't run SSR in develop by default - only in We also have an experimental |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have started with the tutorial at https://www.gatsbyjs.com/docs/tutorial/part-one/.
When I check the source code of the page in the browser, to see what I got from the server, I see the following:
I can see, that there is no "Hello world!" in there. It is only inserted via hydration, although it is purely static data. This should be statically rendered, not inserted via hydration. So I looked around and found https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser/#replaceHydrateFunction. However, putting
into a
gatsby-browser.js
in the root directory of my project did nothing.If a user visits my page without JS activated, they will only see a white space, although all I have to show is static content.
How can I render an entirely static page in one go, without any unnecessary hydration?
Beta Was this translation helpful? Give feedback.
All reactions