What problem does it solve?
This Skill guides advanced Next.js App Router patterns, enabling robust architecture for route handlers, parallel routes, server actions, and streaming with Suspense. It emphasizes separating server actions from client components and using cookies securely with server actions.
Core Features & Use Cases
- Route Handlers & Server Actions: Implement API-like endpoints with server-side mutations and form handling.
- Parallel & Intercepting Routes: Build complex routing patterns for modals, drawers, and nested layouts.
- Streaming & Draft Mode: Set up streaming responses and CMS draft workflows with Suspense.
- Use Case: Use when you need server-only actions, cookies manipulation, and advanced routing scenarios in Next.js App Router.
Quick Start
Configure a Next.js App Router project to support Route Handlers, Parallel Routes, and Server Actions. Create app/[feature]/route.ts for API-style routes, implement action.ts or actions.ts with 'use server', and enable streaming with Suspense where appropriate.