Why is SSG page rendered twice with different props (client/server)? Behaviour is confusing #12345
Unanswered
Vadorequest
asked this question in
Help
Replies: 1 comment 2 replies
-
AFAIK SSG works different in dev mode and prod mode. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't understand the workflow of a static page rendering when using SSG, using
v9.3.6
.1. When I first load the page (page refresh), here is what I get:
Server console:
Browser console:
2. When I click on a link, I get redirected to
/fr/terms
, here is what I get:Server console:
Browser console:
Source code of the Terms page (Home page is similar):
I don't understand the following:
Home props/Terms props
, the first time we seem to get aRouter
instance, but the second time we get the props returned bygetStaticProps
. This is highly confusing about what I should actually rely on to build my app.getStaticProps
, but it rather seems to be the other way around. Probably related to iSSG (see RFC: Incremental Static Regeneration #11552), because the goal would be to render immediately and then regenerate the static content, it makes sense in such context (but unfriendly to developers, and should be thoroughly documented)There doesn't seem to be any CSR anymore when navigating links, but only full-page refresh (see <Link> with SSG makes a full page refresh #12344)Beta Was this translation helpful? Give feedback.
All reactions