Next.js vs React, and which one to learn first
React draws the user interface. Next.js is a framework built on React that adds routing, HTML from the server, data loading, and a build. Here's how they differ, when you need Next.js, and why React comes first.

You can buy an engine, or you can buy a car. The engine is what makes a car go, but on its own it has no wheels, no seats, and no brakes. A car maker builds all of that around the engine, and makes a lot of choices for you along the way.
React is a library for building user interfaces out of components. Next.js is a framework built on React that adds what a whole app needs around it: routing, HTML made on the server, data loading, a build, and code that runs on the server. They aren't rivals. Every Next.js page is a React component, so the usual order is React first, then Next.js.
What does React do on its own?
React's job is the user interface. It turns components and data into a page, and it keeps the page in step with the data as it changes. Why React? shows how it does that.
Everything around the interface is left to you. Take a React app set up the way a new Vite app is. Its server sends a nearly empty page, with one empty <div id="root">, and React draws the content in the browser once the JavaScript has arrived. That's called client-side rendering. Until the JavaScript has run, the visitor sees a blank page. So does any program that reads the HTML without running JavaScript, like the bots that draw link previews in chat apps.
None of that is wrong. React simply doesn't decide it. What the first HTML holds, how addresses map to pages, and where data comes from are all choices you make with other tools. Rendering strategies compares the ways a React app can make its first HTML.
What does Next.js add on top of React?
Next.js makes those choices for you, and connects the parts. Here's each job a whole app needs, done both ways:
| Job | A client-rendered React app | Next.js |
|---|---|---|
| Choosing the page for an address | You add a router library, like React Router, and list the routes | Folders in app are the addresses, and a page.tsx file makes a page |
| The first HTML | Up to you. A client-rendered app sends an empty <div id="root"> |
HTML with the content in it, made during the build or for each request |
| Loading a page's data | Up to you, often in an Effect after the first render | Server Components wait for it on the server, while they render |
| Building and splitting the code | A build tool like Vite bundles it, and splitting it per page is up to you | next build bundles it into chunks, so each route loads the chunks it needs |
| Code that runs on the server | A separate server or API that you write and host | Server Components and Server Functions, in the same project |
| Titles, images, and fonts | Libraries you pick, or code you write | Built in: the Metadata API, next/image, and next/font |
There's also a difference in who's in charge. A library waits for your code to call it: your main.jsx calls React, and React draws what you give it. A framework works the other way around. You put files where Next.js expects them, and Next.js finds them, renders them, and works out when each page's HTML can be made. Why Next.js? builds the same page both ways, so you can see each difference in a real app.
What does the same page look like in each?
Here's a tea shop's home page as a client-rendered React component. It asks for the teas in an Effect, after the first render:
import { useEffect, useState } from "react";
import { getTeas } from "./api";
export default function Home() {
const [teas, setTeas] = useState(null);
useEffect(() => {
getTeas().then(setTeas);
}, []);
if (!teas) return <p>Loading teas…</p>;
return <ul>{teas.map((tea) => <li key={tea.id}>{tea.name}</li>)}</ul>;
}
And here's the same page in Next.js, as app/page.tsx:
import { getTeas } from "./teas";
export default async function Home() {
const teas = await getTeas();
return <ul>{teas.map((tea) => <li key={tea.id}>{tea.name}</li>)}</ul>;
}
The Next.js version is still a React component, but it's a Server Component: it runs only on the server, so it can be async and wait for its data. There's no state, no Effect, and no loading message. By the time the HTML leaves the server, the teas are in it. And getTeas can read a database directly, because its code never goes to the browser.
How is the first page load different?
The two versions send the browser very different things, and that changes when the visitor sees the content.

In the client-rendered app, the browser waits for the HTML, then for the JavaScript, then for the data, one after the other. In the Next.js app, the teas arrive in the HTML. Both end with React running in the browser. In Next.js, that last step is called hydration: React attaches the event handlers to the HTML that's already on the screen, so the buttons start to work. A first look at how Next.js works follows one visit through every step, and hydration explains that last one in depth.
Is Next.js better than React?
That question compares two different kinds of thing, since Next.js uses React. The real choice is between a framework like Next.js and a plain, client-rendered React app.
A framework is the better fit when:
- The first HTML matters, because search engines and link previews read it, or because the page must show quickly on slow phones.
- Pages need data from a server or a database the browser can't reach.
- The app will grow to many pages.
A plain React app is often simpler when:
- Everything is behind a login and the data already has an API, like a staff dashboard.
- React draws one widget inside a page built with something else.
- The whole app lives in the browser, like a drawing tool that works offline.
- You're learning React, and want everything that happens to be in your own code.
React's own docs recommend starting a new app with a framework, and Next.js's App Router is the first one they list. They also explain how to build one without a framework, for example when you just want to learn the basics.
Should you learn React or Next.js first?
Learn React first. Next.js code is React code. Components, props, state, Effects, Suspense, and form actions all work the way React teaches them. What Next.js adds is where each one runs. If you start with Next.js, you're learning two things at once, and when something breaks, it's hard to tell which of the two it came from.
These are the parts of React that Next.js code leans on every day:
- components and props
- state and Effects
- Suspense and the use API
- Server Components and Server Functions
- form actions
Once those feel comfortable, Next.js changes a few habits. Components start as Server Components on the server, and a file that begins with "use client" marks the part that also runs in the browser, where state, clicks, and Effects live. Effects run only in the browser. A page usually loads its data in an async Server Component instead of an Effect. And a form's action can be a function that runs on the server. The React you need for Next.js is a refresher on exactly those changes.
One mix-up is worth clearing up early: Next.js isn't a different kind of React. Its pages, layouts, and buttons are ordinary React components. Next.js decides how they're built, rendered, and sent.
Where to go next
If you're new to React, start with the React course and come back when components, state, and Effects feel familiar. If you know React, start the Next.js course with Why Next.js?. To check yourself, try the interview question what does Next.js add to React?, then build a real page in the Next.js practice problems.


