Introduction to Next.js
React itself is just a UI library — it doesn't decide how pages are routed, how a project is structured, or how a page gets its data before it's shown to a visitor. Next.js is a framework built on top of React that answers those exact questions, so a team doesn't have to invent its own answer to each one from scratch.
Example: starting a new project
npx create-next-app@latest my-app
cd my-app
npm run dev
This scaffolds a working project with routing, a build system, and sensible defaults already wired up, then starts a local dev server — the kind of setup that would otherwise take real, careful configuration to assemble by hand from plain React alone.
npx create-next-app@latest my-app
cd my-app
npm run dev
Starts a dev server, usually at http://localhost:3000.