Data Fetching in Next.js

Click the strategies to navigate

SSG: Static-site generation

Runs once at build-time - reused for each request

05:41:30

SSR: Server-side rendering

Runs on every request - fetch data before sending page to client

05:41:30

CSR: Client-side rendering

Runs on every request - load page first and fetch data on client-side (loading... => data)

05:41:30

ISR: Incremental Static Regeneration

SSG and SSR combined - update data after a certain revalidation time (7 seconds)

05:41:30

to see changes


Erik Streller 2026 Source Code