SSG vs RSC
Answered
johndoe7144 posted this in #help-forum
Hey, I've been looking into RSC and I noticed that appdir doesn't support getstaticprops and stuff that's needed for SSG now? If SSG pages are created at build time and can be rebuilt using ISR, I'd have loved to use it for static blogs and stuff where nothing would need to be changed. I'll just fetch it from my api during build time and if something changes, I'd revalidate using ISR. But for 13.4 won't RSC take time to serve pages due to fetching and stuff compared to caching during build for SSG? I want to serve pages as fast as possible. Is it possible to use SSG in 13.4 with app dir or am I being stupid? I'm new to these changes so I'd like to be pushed to the right direction if I'm wrong! Thanks!
8 Replies
Oh wow! Thanks! â¤ï¸
@joulev <https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic-rendering>
But what if I want to revalidate when I want? (Not duration based) like ISR where I'd have to GET an api route to revalidate that particular page
I plan to make some parts of my site editable to admins like my navbar content and which is a server component. It's fetched from the db so I'm guessing next statically generates RSCs so I can invalidate it using on demand revalidation when it's updated again, right?
Sorry for asking a lot of questions 😅
@johndoe7144 I plan to make some parts of my site editable to admins like my navbar content and which is a server component. It's fetched from the db so I'm guessing next statically generates RSCs so I can invalidate it using on demand revalidation when it's updated again, right?
Yeah, it’s just like in the pages dir days