> nextjs-rendering

SSG, SSR, ISR, Streaming, and Partial Prerendering (PPR). Use when choosing a rendering strategy (SSG, SSR, ISR, PPR, or Streaming) in Next.js. (triggers: **/page.tsx, **/layout.tsx, generateStaticParams, dynamic, dynamicParams, PPR, streaming)

fetch
$curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/nextjs-rendering?format=md"
SKILL.mdnextjs-rendering

Rendering Strategies (App Router)

Priority: P0 (CRITICAL)

Choose rendering strategy based on data freshness and scaling needs. See Strategy Matrix.

Guidelines

  • SSG (Default): Build-time render. Use generateStaticParams.
  • SSR: Per-request render. Triggered by cookies(), headers(), or cache: 'no-store'.
  • Streaming: Wrap slow components in <Suspense> to avoid blocking.
  • ISR: Post-build updates. Use revalidate (time) or revalidatePath (on-demand).
  • PPR: Static shell + dynamic holes. Experimental ppr config.
  • Runtime: Node.js (Full) or Edge (Lighter/Faster).

Scaling & Hydration

  • Static Shell: Render layout as static, personalize via Suspense.
  • Error Boundaries: Use error.tsx with reset() to catch runtime errors.
  • Hydration Safety: Avoid typeof window or Date.now() in initial render. Use useEffect.

Anti-Patterns

References

┌ stats

installs/wk0
░░░░░░░░░░
github stars341
██████████
first seenMar 17, 2026
└────────────

┌ repo

HoangNguyen0403/agent-skills-standard
by HoangNguyen0403
└────────────

┌ tags

└────────────