The React meta-framework. File-based routing, server components, image optimization, and a tight feedback loop with Vercel — Next.js is the production answer to "I want to build a React app."
← Back to Client Sideapp/products/page.tsx becomes the route /products."use client" — for interactivity.route.ts) replace API routes — REST, webhooks, edge functions.// app/products/page.tsx — server component, runs on the server async function getProducts() { const res = await fetch("https://api.example.com/products", { next: { revalidate: 60 }, // ISR: cache for 60s }); return res.json(); } export default async function ProductsPage() { const products = await getProducts(); return ( <ul> {products.map(p => ( <li key={p.id}>{p.name} — ${p.price}</li> ))} </ul> ); }
The App Router (default since v13) is built on RSC. Each route can mix server-rendered and client-interactive components in one tree. Layouts, loading.tsx, error.tsx, and not-found.tsx are special files for nested UI.
Mark a function with "use server" and call it directly from a form or client component. Next handles the network round-trip, optimistic updates, and validation. No REST endpoints to wire up.
next/image — automatic optimization, lazy loading, responsive sizes.next/font — self-host Google Fonts; zero CLS.next/script — strategic third-party script loading.Vercel is the easiest target (built by the same team), but Next.js runs on Node, Docker, AWS, Cloudflare Pages, Netlify, and self-hosted setups. next build && next start is enough for a Node host.
SSG + ISR for blogs, docs, landing pages — fast and SEO-friendly.
Server components for data, client components for interactivity.
ISR product pages, Server Actions for cart, edge for global latency.
Streaming UI for LLM responses; Vercel AI SDK integrates tightly.