Is it normal for nextJS to be running getServerSideProps even when navigating through next router? #14574
-
when I create route |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, From what I've read in the doc, it's the expected behaviour. You can read about data fetching in nextjs at https://nextjs.org/docs/basic-features/data-fetching. |
Beta Was this translation helpful? Give feedback.
-
It is how it is supposed to be, your page will be server side rendered, meaning that every request will require |
Beta Was this translation helpful? Give feedback.
It is how it is supposed to be, your page will be server side rendered, meaning that every request will require
getServerSideProps
to run, if you want it to only run once take a look intogetStaticProps
instead, which will give you very fast client side navigations and static content instead of serverless functions.