Next.js Discord

Discord Forum

App router dont have SSG?

Answered
Somali posted this in #help-forum
Open in Discord
SomaliOP
In the pages dir we had getStaticPaths, but I can't find anything similar in app router, so either it does it automatically or app router only has server rendering?
If not, how does next.js understand the paths (as it didn't understand it in the pages dir)

3 Replies

Actually, it is SSG by default, by adding revalidations, it turns into ISR. And if you also use dynamic functions like cookies, this will turn the page into dynamic rendering, which is SSR (rendered at request time)
So just add your server-side code into a server component
Answer