Next.js Discord

Discord Forum

NextJS 13 - App Router - All pages are forced SSR in Dev?

Unanswered
Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
I have a basic page with a SQL call to fetch data for the page, and a revalidate = 30. When i run this page in dev (npm run dev) the page is complete SSR, always a SQL call made every page refresh. When i run this page in prod (npm run build + start) the page is ISR and only makes a SQL call after 30 seconds, which is correct behavior due to the presence of 'revalidate'. Is this normal functionality in dev that every page is forced to SSR (aka no SSG or ISR)?

2 Replies

yeah the reason being that you always have the fresh data when developing the app, otherwise if you modify your DB you would need to wait ~30 seconds to be able to test it
Brown bearOP
Makes sense, i kind of figured that was the case, for ease of development. Do you have a reference to this in NextJS documentation?