nextjs-app-router-patterns

Provide Next.js App Router patterns for Server Components, streaming, and parallel routes.

Updated Sep 6, 2024
One-click install
npx skills add https://github.com/Jaylaelike/pm25-interactive-thaipbs-app --skill nextjs-app-router-patterns-jaylaelike
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-app-router-patterns
Source: https://github.com/Jaylaelike/pm25-interactive-thaipbs-app/tree/main/.claude/skills/nextjs-app-router-patterns
Command: npx skills add https://github.com/Jaylaelike/pm25-interactive-thaipbs-app --skill nextjs-app-router-patterns-jaylaelike

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides structured patterns and templates to help developers build robust Next.js 14+ App Router applications using Server Components, streaming, and parallel routes.

Core Features & Use Cases

  • Server Component patterns for data fetching and UI composition
  • Streaming and Suspense to progressively render large data
  • Parallel routes and intercepting routes for modular, resilient UIs
  • Server Actions and route handlers for server-side mutations and APIs
  • Migration guidance from Pages Router to App Router for existing projects

Quick Start

Create a new Next.js app and adopt the App Router patterns described here. Implement a root layout with a server component, a page with data fetching, a loading boundary, and a parallel route with analytics and team slots to observe concurrent loading. Experiment with a modal route using the intercepting routes pattern.

Frequently Asked Questions about nextjs-app-router-patterns

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

FAQPage Schema
How do I structure Next.js App Router projects using Server Components and parallel routes?

Structure Next.js App Router projects by applying file structure conventions for Server Components, data fetching, and parallel routes to compose modular, resilient UIs with concurrent loading slots.

What is the best way to implement streaming and Suspense for large data in Next.js?

Implement streaming in Next.js by wrapping data fetching operations in Suspense boundaries to progressively render UI chunks as data becomes available without blocking the entire page.

How do I use Server Actions and route handlers for mutations in Next.js App Router?

Use Server Actions and route handlers in Next.js App Router to execute server-side mutations and API interactions directly from components without writing separate API endpoints.

Can I build intercepting routes for modals in a Next.js App Router architecture?

Yes, build intercepting routes for modals in a Next.js App Router architecture to overlay content contextually while maintaining URL state and preserving deep linking capabilities.

Does this provide migration guidance from Next.js Pages Router to App Router?

Yes, it provides migration guidance from the Next.js Pages Router to the App Router, helping existing projects transition to Server Components, streaming, and new routing conventions smoothly.

When should I use parallel routes instead of standard nested routes in Next.js?

Use parallel routes instead of standard nested routes when you need concurrent UI rendering, such as dashboard analytics and team slots, allowing independent error handling and loading states for scalable apps.