Skip to content

nextjs

Use when working with Next.js App Router, React Server Components, server actions, layouts, metadata API, or caching. Also use when configuring Next.js middleware/proxy, optimizing images/fonts, or debugging hydration errors.

ModelSource
sonnetpack: frontend
Full Reference

┏━ πŸ”§ nextjs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when working with Next.js App Router, Reac… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Next.js (v16.1.6 LTS, February 2026) is a React framework with file-system routing, React Server Components, and a multi-layer caching model. The App Router is the default and only actively developed router. Turbopack is now the default bundler for both dev and build.

ItemValue
Current Version16.1.6 LTS (February 2026)
Installnpx create-next-app@latest
Confignext.config.ts (TypeScript-native)
Devnext dev (Turbopack default)
Buildnext build (Turbopack default)
Node.js20.9.0+
React19.2
Docshttps://nextjs.org/docs
I want to…File
File conventions, layouts, templates, next.config.tsreference/project-structure.md
Server vs Client Components, 'use client', 'use server'reference/server-components.md
Dynamic routes, route groups, parallel routes, route handlersreference/routing.md
Data fetching, use cache, Server Actions, useActionState, useOptimisticreference/data-fetching.md
Caching layers, revalidation, revalidateTag, updateTagreference/caching.md
Metadata API, OG images, next/image, next/fontreference/assets-and-seo.md
proxy.ts, middleware.ts, auth guards, geo routingreference/middleware.md
error.tsx, not-found.tsx, global-error.tsx, instrumentation.tsreference/error-handling.md
Next.js 15β†’16 breaking changes, deprecations, migration codemodsreference/migrations.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.

Load only the reference docs relevant to the current task.

WasNow
middleware.tsproxy.ts (export proxy fn)
fetch cached by defaultNOT cached β€” opt in with cache: 'force-cache'
await params optionalRequired in Next.js 15+
useFormState (react-dom)useActionState (react)
experimental.ppr / dynamicIOcacheComponents: true
revalidateTag(tag)revalidateTag(tag, 'max')
unstable_cache'use cache' directive
images.domainsimages.remotePatterns
Node.js 18Node.js 20.9.0+ required