Create your free BvLogic ID to continue this course and save your progress.
Next.js 5 lessons
  1. 1 What Next.js adds to React
  2. 2 Routing and the two kinds of component sign in to open
  3. 3 Fetching and caching data sign in to open
  4. 4 Search, metadata and sharing sign in to open
  5. 5 Deploying and keeping it fast sign in to open
Course overview
Data: video · change

This lesson: 122KB

Next.js · Lesson 1 of 5

What Next.js adds to React

Know which problem each feature solves.

React on its own renders in the browser. The server sends a nearly empty page and JavaScript builds the content after it arrives. That is fine for an application behind a login and poor for anything that needs to be found, shared or loaded quickly on a weak connection.

Next.js adds the server side. Four things follow from that, and each solves a specific problem.

Rendering on the server means the visitor receives real HTML. The page appears sooner, search engines see content without executing anything, and a link shared on WhatsApp shows a preview. For a business site or a shop this is most of the reason to use it.

Routing from the file system. A folder becomes a URL. No router configuration to maintain and no chance of it drifting from reality.

An API in the same project. Server routes live beside your pages, so a small application does not need a separate backend, one deployment, one repository.

Images, fonts and scripts handled for you. The image component resizes, converts format and lazy loads. Fonts are self hosted automatically, which removes a third party request and a layout shift.

What it costs: you now run a server, or a platform that runs one for you, and deployment is more involved than copying files to shared hosting. You also have to know which code runs where, which is the main source of confusion for people arriving from plain React.

Learn React properly first. Next.js is React plus a server, and skipping the first half shows.

Lab — try it yourself

Take one React page and view its source before JavaScript runs. Then do the same with a Next.js page and compare what a search engine would see.

Check what you learned

Create your free BvLogic ID to take the quiz and record your score.

Create your BvLogic ID
Continue to lesson 2 Up next 2. Routing and the two kinds of component