Next.js Documentation
Next.js framework documentation. Use for App Router, Server Components, routing, data fetching, rendering, caching, and APIs.
Quick Reference
| Task | Entry Point |
|------|-------------|
| Installation and setup | contents/01-app/01-getting-started/01-installation.mdx |
| App Router getting started | contents/01-app/01-getting-started/ |
| Pages Router getting started | contents/02-pages/01-getting-started/ |
| App Router API functions | contents/01-app/03-api-reference/04-functions/ |
| File conventions (layout, page, etc.) | contents/01-app/03-api-reference/03-file-conventions/ |
| next.config.js options | contents/01-app/03-api-reference/05-config/01-next-config-js/index.mdx |
| Components (Image, Link, Script) | contents/01-app/03-api-reference/02-components/ |
| Guides and how-tos | contents/01-app/02-guides/ |
When to use
Use this skill when the user asks about:
- App Router and Server Components
- Routing, layouts, pages, and file conventions
- Data fetching, caching, and revalidation
- Server Actions and mutations
- Next.js API functions (cookies, headers, redirect, etc.)
- next.config.js configuration
- Pages Router (getStaticProps, getServerSideProps, useRouter)
- Deployment, middleware, and edge runtime
How to find information
- First, read
TOC.mdfor complete file listing organized by directory - Identify relevant section based on user's question
- Read specific files for details
TOC.md contains all files organized by directory - always check it first.