Skip to content

Next.js

The full-stack meta-framework built on React.

Meta-Framework

Next.js is to React what Nuxt is to Vue: it adds server-side rendering, file-based routing, and a full-stack server layer on top of React components. It's maintained by Vercel and is the most widely deployed React meta-framework, with first-class support for its own hosting platform alongside standard Node deployment.

When to use it

  • SEO matters and you want React's ecosystem specifically
  • You want the React Server Components model and are comfortable with the App Router's newer conventions
  • You're deploying to Vercel and want the tightest integration between framework and host
  • Your team already knows React and needs SSR/SSG without switching ecosystems

Considerations

  • The App Router (Server Components, streaming) is a genuinely different mental model from plain React — expect a real learning curve even for experienced React developers
  • Some third-party React libraries assume a client-only environment and need adjustment to work with Server Components
  • Like Nuxt, SSR adds infrastructure considerations a plain SPA doesn't have

Key concepts

App Router

File-based routing under app/, built around React Server Components by default.

Server Components

Components that render on the server and send no JavaScript to the client unless explicitly marked 'use client'.

Rendering strategies

Static generation, server-side rendering, and incremental static regeneration are all available per-route.

API routes

Route handlers let you build backend endpoints inside the same project as your frontend.

Getting started

npx create-next-app@latest

Scaffold a new Next.js project (prompts for TypeScript, App Router, Tailwind, etc.).

cd my-app && npm run dev

Start the dev server.

Ecosystem

Vercel (hosting)shadcn/ui (components)Prisma (ORM, commonly paired)NextAuth.js / Auth.js (auth)

This guide states trade-offs, not a single "best" answer — the right choice depends on your team, constraints, and existing stack.