Skip to content

Question | SSR #170

Sep 19, 2020 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Because it's a matter of optimization.

With SSG, we don't care much about optimization, since it won't slow down real users, but with SSR it will, so we need to be more careful.

Because each GQL request depends on what page is being displayed, we don't preload the customer because we want to load all the data that page needs at once, and we can't know that from getExamplesCommonServerSideProps.

Instead, we do it on the page itself, and that way we only run one GQL query.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@samuelcastro
Comment options

Answer selected by samuelcastro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants