next-data-rendering

Configure Next.js rendering strategies for SSG, SSR, ISR, and CSR.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/zacharyr0th/next-starter --skill next-data-rendering
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-data-rendering
Source: https://github.com/zacharyr0th/next-starter/tree/main/.claude/skills/next/next-data-rendering
Command: npx skills add https://github.com/zacharyr0th/next-starter --skill next-data-rendering

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Master rendering strategies (SSG, SSR, ISR, CSR) and caching/revalidation to optimize performance.

Core Features & Use Cases

  • Static generation and ISR with revalidation
  • Server-side rendering with fetch optimizations
  • Client-side rendering patterns and caching
  • Partial prerendering and streaming concepts

Quick Start

Request a plan for a page using a mix of SSG and ISR with targeted revalidation.

Frequently Asked Questions about next-data-rendering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the different rendering strategies in Next.js and when should I use each one?

Next.js rendering strategies include SSG (Static Site Generation) for pre-built pages, SSR (Server-Side Rendering) for dynamic content per request, ISR (Incremental Static Regeneration) for updated static pages on a schedule, and CSR (Client-Side Rendering) for interactive components. Choose SSG for content that changes infrequently, SSR for user-specific data, ISR for content needing periodic updates, and CSR for highly interactive features.

How do I set up revalidation and caching in Next.js to optimize performance?

Configure revalidation using the `revalidate` option in getStaticProps for ISR, set cache headers via response objects in route handlers, and leverage Next.js's multi-layer caching: data caching for fetch results, route caching for rendered pages, and router caching for navigation. Combine these to reduce rebuild time and server load.

Can I use partial prerendering and streaming together in Next.js?

Yes. Partial prerendering generates static shells while streaming dynamic content on demand, reducing initial load time. Use Suspense boundaries to mark streaming regions and combine with ISR revalidation strategies to balance performance and freshness across mixed static and dynamic sections.

How do I optimize fetch requests and data caching for server-side rendering in Next.js?

Use Next.js fetch caching by default, specify `cache: 'no-store'` to disable caching for dynamic data, and set `revalidate` tags for fine-grained invalidation. Combine data layer caching with route caching to reduce redundant requests and improve SSR performance.

What's the best way to handle SEO when choosing between SSG, SSR, and CSR?

SSG and SSR are SEO-friendly because content renders server-side before delivery, enabling search engine crawling. Use SSG for static pages and SSR for dynamic content requiring fresh data. Avoid pure CSR for SEO-critical pages; if needed, combine with dynamic sitemap generation and meta tags.

When should I not use static generation and instead switch to server-side rendering?

Avoid static generation for pages with frequently changing data, user-specific content, or real-time information. Switch to SSR when content depends on request headers, query parameters, or database values that vary per visitor, and ISR cannot meet freshness requirements.