Rendering

A Short Guide to Rendering in Next.js

Blazity team
20 Jun 2025
3 min. read

A Comprehensive Overview of Next.js Rendering Strategies

Rendering is fundamental to web performance and directly impacts how quickly users access and interact with content. Next.js supports several rendering methods:

  • Server-Side Rendering (SSR)
  • Static Site Generation (SSG)
  • Incremental Static Regeneration (ISR)
  • Client-Side Rendering (CSR)

The App Router introduces React Server Components (RSC) and other paradigms that optimize data fetching and reduce client-side JavaScript overhead.

Implementation

App Router Rendering Strategies

Server Components

Server Components run exclusively on the server, sending lightweight JSON or rendered HTML to the client.

Core Characteristics:

  • Server-Side Execution: Direct database access without API layers
  • Bundle Size Optimization: Large dependencies remain on the server
  • Built-in Data Fetching: Results included in initial HTML

Core Characteristics:

async function ProductsPage() {
 const products = await db.query('SELECT * FROM products');
 return ;
}

Limitations:

  • Browser APIs unavailable (window, document)
  • Interactive features requiring hooks cannot be implemented
  • State management hooks unavailable

Optimal Use Cases: Data-heavy components, SEO-critical content, static content.

Client Components

Client Components enable interactivity and dynamic behavior while still participating in server-side rendering for initial page loads.

'use client';
import { useState } from 'react';
export default function InteractiveForm() {
const [formData, setFormData] = useState({ name: '', email: '' });
// Full access to browser APIs, state management, event handling
}

Optimal Use Cases: Interactive UI elements, real-time features, browser API access, third-party client libraries.

Server-Side Rendering (SSR)

Dynamic rendering generates HTML on each request. Use fetch with { cache: 'no-store' } or export const dynamic = 'force-dynamic'.

Benefits: Fresh data, personalization, SEO-friendly.

Trade-offs: Higher server load, slower TTFB than static.

Static Site Generation (SSG)

Pages are rendered at build time and served as static HTML files. Default behavior in App Router.

Benefits: Fastest possible TTFB, minimal server load, CDN-cacheable.

Trade-offs: Build time increases with pages, data can become stale.

Incremental Static Regeneration (ISR)

Combines SSG speed with data freshness using revalidate:

async function ProductPage() {
 const product = await fetch('https://api.example.com/product', {
   next: { revalidate: 3600 }
 });
}

Static speed with periodic updates, no full rebuilds.

Client-Side Rendering (CSR)

Renders content entirely in the browser using JavaScript. Use 'use client' directive with data fetching libraries.

Benefits: Rich interactivity, reduced server load.

Trade-offs: Slower initial load, SEO challenges, JavaScript dependency.

Pages Router Strategies

The Pages Router uses getServerSideProps for SSR, getStaticProps for SSG, and getStaticPaths for dynamic routes.

Keypoints

  1. Use dynamic imports and next/dynamic to load code only when needed.
  2. Next.js automatically splits pages into separate chunks.
  3. Disabling SSR ensures that a component loads only on the client.
  4. Large conditional UI elements benefit from dynamic imports.
  5. Server components are automatically code-split.
  6. Code splitting separates pages and components into small chunks, reducing bundle size.

Subscribe to our newsletter

Get Next.js tips, case studies, and frontend insights delivered to your inbox.

By clicking Sign Up you request to receive newsletters from us in accordance with Website Terms. The Controller of your personal data is Blazity Sp. z o.o. with its registered office at Warsaw, Poland, who processes your personal data for marketing purposes. You have the right to data access, rectification, erasure, restriction and portability, object to processing and to lodge a complaint with a supervisory authority. For detailed information, please refer to the Privacy Policy.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.