Skip to content
Web Developmentintermediate

What is Next.js?

Updated Nov 30, 20264 min readBased on official documentation
What is Next.js?

In short

Next.js is a React framework for building full-stack web applications. It adds routing, rendering options and build tooling on top of React, so you can focus on your product instead of configuring the tools yourself. It suits intermediate developers who already know React basics.

What Next.js does for React

React lets you build user interfaces from small pieces called components. React itself does not decide how pages are addressed, how they are rendered on a server, or how your code gets bundled for the browser. Those jobs are left to you.

Next.js fills that gap. It is a framework built on React, which means it gives you a set of conventions and features on top of the library. You still write React components. Next.js adds the extra features that a real product usually needs, such as pages, data loading and optimizations for speed.

A key idea is that Next.js configures the lower-level tools for you. A bundler is the program that packs your code and assets into files a browser can load. A compiler turns newer JavaScript and JSX syntax into code that browsers understand. Next.js sets these up by default, so you can start building right away instead of spending hours on configuration.

The official documentation describes Next.js as a way to build full-stack web applications. Full-stack means that one project can contain both the screens users see and the server-side code that answers requests, such as code that reads data from a database.

Two routers: App Router and Pages Router

Next.js has two routers. A router decides which code to run when a user visits a particular address, such as /blog/hello. The two options are different in how they work and which React features they support.

The App Router is the newer option. It supports newer React features like Server Components, which are components that run on the server and send their output to the browser. The Pages Router is the original router. It is still supported and continues to be improved.

The two routers handle React versions differently. The App Router uses React canary releases built in. Canary releases are test builds that include stable React 19 changes along with newer features that are being checked in frameworks before a full React release. The Pages Router uses the React version listed in your project's package.json file, which is the file where a Node.js project records its dependencies.

This split lets new React features work reliably in the App Router while existing Pages Router applications keep working as before. When you start a new project, check which router the guide you follow uses, because the folder layout and APIs differ.

How the documentation is organized

The official docs are split into three sections. Getting Started contains step-by-step tutorials that help you create a first application and learn the core features. Guides cover specific use cases, so you can read only what matters for your project. The API Reference describes every feature in technical detail.

The sidebar helps you move between sections. You can also press Ctrl+K on Windows and Linux, or Cmd+K on macOS, to search for a page. If you are unsure where to begin, start with Getting Started and return to the reference when you need exact details.

Before you start

The documentation assumes you already know some web development. It helps to be comfortable with HTML for page structure, CSS for styling, JavaScript for logic, and React for components. If React is new to you, learn its basics first. Our What is the DOM? page explains the browser structure that React updates, which is useful background for understanding how components reach the screen.

Once you know React basics, the Next.js tutorials will walk you through building a real app. The official site also suggests a React course and a Next.js course that build an application while you learn.

Common mistakes beginners make

A common mistake is mixing App Router and Pages Router examples. Many tutorials online were written for one router, and their file structure and data functions may not match the other. Before copying code, confirm which router the example uses.

Another mistake is treating Next.js as a replacement for knowing React. Next.js builds on React concepts such as state and props. If those ideas are unclear, the framework features will feel confusing, even when the setup is handled for you.

Finally, do not assume that every feature works the same in both routers. Check the documentation for the router you chose, and read the relevant API reference page before using a feature in production.

Next.js is not the only way to build a React app. You can use React with a build tool and a separate server, or choose a framework built around a different library. If you work with other ecosystems, our What is Vue.js? page describes a different component framework with its own conventions. For data APIs, What is GraphQL? explains one way clients request data from servers, which pairs well with full-stack frameworks. Understanding HTTP also helps, since every page request a Next.js app serves follows that protocol.

The right choice depends on your team, your project and the features you need. Next.js is a strong option when you want React with rendering, routing and build setup included.

FAQ

Do I need to know React before learning Next.js?

Yes, the official docs assume familiarity with HTML, CSS, JavaScript and React. If React is new to you, learn its basics first, then move on to Next.js.

What is the difference between the App Router and the Pages Router?

The App Router is the newer option and supports features like Server Components. The Pages Router is the original router, still supported and improved. The two handle React versions differently.

Is Next.js a replacement for React?

No. Next.js is a framework built on top of React. You still write React components, and Next.js adds routing, rendering and build features around them.

Where should I start in the Next.js documentation?

Start with the Getting Started section, which has step-by-step tutorials. Use Guides for specific use cases and the API Reference when you need exact technical details.

Sources

This page is based on the official documentation below. Read it for full detail.

Next.js — official documentation ↗

Next.js in the news

blozhikDeveloper news from across the web, explained. Every story links to its original sources.