CodePark/ questions / App Router & files
START PRACTICINGPRACTICE
Frontend question · Next.js › App Router & files

What does Next.js add on top of plain React?

Next.js is a full framework built on React. React itself is only a UI library: it renders components, but it leaves routing, server rendering, data loading, bundling and deployment to you. Next.js fills those gaps.

Next.js adds these features:

  • Routing: file-system routing, where folders become URLs, with nested layouts.
  • Server rendering: static prerendering at build time, dynamic rendering per request, ISR (Incremental Static Regeneration: static pages rebuilt in the background) and streaming.
  • React Server Components and Server Actions, supported as first-class features.
  • Caching: a caching and revalidation system for data and pages.
  • Backend logic: Route Handlers (HTTP endpoints) and middleware.
  • Built-in optimizations: next/image, next/font, next/link prefetching and automatic code splitting per route.
  • Tooling: a ready-configured compiler and bundler, and several deployment outputs.

The result is better SEO and a faster first load than a client-only React app, with less setup.

  • React is a UI library. Next.js is a full framework built around it.
  • Next.js gives you file-system routing with nested layouts.
  • It offers several server rendering options: static, dynamic, ISR and streaming.
  • It adds Server Components, Server Actions, Route Handlers and middleware.
  • It has built-in optimizations for images, fonts, links and bundling.