Skip to content
Discussion options

You must be logged in to vote

Hey @Kartik3oy,👋

I was figuring out when to use SSR vs CSR is something everyone bumps into when building production apps with Next.js.

Here’s a simple mental model that’s worked well for me 👇


When to go with SSR (Server-Side Rendering)

Use SSR if:

  • You care about SEO — think blog posts, product pages, landing pages, etc.
  • You need fresh data every time the page loads.
  • You want pages to respect auth state immediately (like dashboards that show personalized info).

Example (App Router):

// app/dashboard/page.js
export const dynamic = 'force-dynamic';

export default async function Dashboard() {
  const res = await fetch(`${process.env.API_URL}/data`, { cache: 'no-store' });
  const data = a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Kartik3oy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants