How to implement incremental static generation on Next.js 13?
Answered
Southern rough shrimp posted this in #help-forum
Southern rough shrimpOP
How to implement incremental static generation on Next.js 13?
Answered by fuma
On App Router, your pages are statically generated by default. You can manually opt out of static generation by adding segment config, for example,
If you are using
revalidate in order to use ISR.If you are using
fetch, it supports the [revalidate property](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating). I think it's probably what you're looking for6 Replies
On App Router, your pages are statically generated by default. You can manually opt out of static generation by adding segment config, for example,
If you are using
revalidate in order to use ISR.If you are using
fetch, it supports the [revalidate property](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating). I think it's probably what you're looking forAnswer
@fuma On App Router, your pages are statically generated by default. You can manually opt out of static generation by adding segment config, for example, `revalidate` in order to use ISR.
If you are using `fetch`, it supports the [`revalidate` property](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating). I think it's probably what you're looking for
Southern rough shrimpOP
even async pages are statically generated?
I mean yeah I guess it makes sense
Yes, unless you're using dynamic functions like
cookies or headers, or it's a dynamic routeSouthern rough shrimpOP
🤩 Thanks for the quick response @fuma
