Content
Next.js Patterns
Production patterns for Next.js App Router: React Server Components, data fetching, caching strategies, Server Actions, streaming with Suspense, proxy (formerly middleware), metadata, and error handling. This skill focuses on architecture decisions that determine whether a Next.js app is fast, maintainable, and secure in production. Keep React, Node, and toolchain dependencies patched (see Edge cases / Security).
When to use
- Building a new application on Next.js App Router
- Migrating from Pages Router to App Router
- Deciding server vs. client component boundaries
- Implementing data fetching with explicit caching (Cache Components)
- Setting up authentication logic at the network boundary (proxy.ts)
- Configuring metadata and SEO for production
- Implementing Server Actions for form mutations
- Targeting multiple hosts/providers using Adapters / OpenNext (cross-provider deployments)
When NOT to use
- Non-Next.js React applications — use React patterns directly
- Static sites with no server requirements — consider Astro or Vite
- Complex backend services — Next.js route handlers/proxy are thin; use a dedicated backend for heavy business logic
- CSS/design system work — use a dedicated design-system skill
- Animation-heavy apps that need consistent cross-browser motion — evaluate dedicated animation libraries (see View Transitions note)