Foundations

Next.js

A React framework for production web apps: routing, rendering modes, and conventions for building and deploying full-stack-capable frontends.

What it is

Next.js layers file-based routing, server and client components (depending on version), data-loading patterns, and build output options on top of React. It decides how pages are built, split, and served.

Why it matters

It answers questions React leaves open: how URLs map to UI, how HTML is generated, how assets are optimized, and how you ship a cohesive app to hosting.

When to use it

Choose Next.js when you want a batteries-included React web stack with clear deployment stories and strong defaults for many marketing and app-style sites. Consider alternatives if you need a minimal SPA-only setup with different bundler priorities.

How it fits in the stack

It sits between React and your host: framework + build tool + runtime conventions. Deployment platforms like Vercel target Next.js closely, but the framework is separate from the host.

Common confusion

Next.js is not just “React with SSR.” It owns routing and rendering policy; React is still the view layer inside it. It is also not interchangeable with Vite-first SPA setups without migration cost.