Question | SSR #170
-
I'm wondering why you're not returning It'd be helpful to keep it as part of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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 Instead, we do it on the page itself, and that way we only run one GQL query. |
Beta Was this translation helpful? Give feedback.
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 fromgetExamplesCommonServerSideProps
.Instead, we do it on the page itself, and that way we only run one GQL query.