Bug #10723
-
|
what is the concept of ssr in the next app router and slots |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
SSR in Next.js App Router — Full Breakdown What is SSR in the Context of App Router? In the App Router (introduced in Next.js 13+), SSR isn't a mode you "opt into" like the old
How SSR Works in App Router Server Component (default — SSR) jsx Client Component (opt-in) jsx Caching Modes — This is Critical in App Router The
Cache Option | Behavior | Equivalent to
-- | -- | --
cache: 'no-store' | Fetches fresh on every request | Classic SSR
cache: 'force-cache' | Fetches once, reuses forever | SSG (Static)
next: { revalidate: 60 } | Rebuilds every N seconds | ISR
Common Misconceptions
|
Beta Was this translation helpful? Give feedback.
SSR in Next.js App Router — Full Breakdown
What is SSR in the Context of App Router?
In the App Router (introduced in Next.js 13+), SSR isn't a mode you "opt into" like the old
getServerSideProps— it's the default behavior. Every component in theapp/directory is a React Server Component (RSC) by default, meaning it renders on the server on every request.How SSR Works in App Router