Next.js vs React: What the Framework Actually Adds

React is a library for building user interfaces. Next.js adds routing, server rendering, data fetching, and build tooling on top of it.

6 min read

React is a JavaScript library for building user interfaces. Next.js is a framework built on top of React, so the Next.js vs React question comes down to what the framework adds: routing, server-side rendering, data fetching, API endpoints, and a configured build. You write the same components in both, but Next.js gives them a place to live and run.

Here is a page in a Next.js app that reads data on the server:

App.tsxApp.tsx
// app/blog/page.tsx
export default async function BlogPage() {
  const res = await fetch('https://api.vercel.app/blog');
  const posts = await res.json();
  return <ul>{posts.map((post) => <li key={post.id}>{post.title}</li>)}</ul>;
}

In plain React, that fetch would run in the browser, usually inside useEffect. In Next.js the page is a server component, so the request runs on the server and the browser receives finished HTML. Server components are a React feature, and Next.js is the framework that makes them work end to end.

What React handles on its own

React's job is the view layer. It gives you components that describe the interface as functions, state and effects for interactivity, and a declarative model where you describe the result and React updates the DOM.

What React deliberately leaves out is everything around the interface: how the page is reached, how it renders on the server, and how data gets into it. You fill those gaps with a router, a bundler, and a server, or you use a framework.

What Next.js adds

Next.js keeps the React component model and supplies the surrounding machinery.

ConcernReact aloneNext.js
RoutingAdd a router libraryFile-based routing built in
RenderingClient-side by defaultServer rendering by default
Data fetchingFetch in effectsServer components fetch directly
Build toolingPick and configure a bundlerTurbopack configured out of the box

Each row is a feature you would otherwise assemble and maintain yourself. The framework also adds image and font optimization, API endpoints through route handlers, and metadata support for search engines.

Which one should you use

Choose React when the interface is the whole problem: a widget, a client-only single-page app, or a component embedded in an existing site.

Choose Next.js when the application also needs server-side rendering, routing, a backend, or a production build. Most multi-page web apps fall into this second group, which is why Next.js is a common starting point for new projects.

If you want the broader picture first, read What Is Next.js and When Should You Use It?. To see the framework in action, follow the Next.js App Router tutorial.

Rune AI

Rune AI

Key Insights

  • React is a JavaScript library for the user interface.
  • Next.js is a framework that adds routing, rendering, and data features on top of React.
  • Server components let a page fetch data on the server instead of in the browser.
  • Next.js ships a configured build with Turbopack as the default bundler.
  • Pick React for widgets and client-only apps, Next.js for full web apps.
RunePowered by Rune AI

Frequently Asked Questions

Can I use React without Next.js?

Yes. React works with any router, bundler, or server you choose, or with none at all for a client-only widget. Next.js is one way to assemble those pieces for a full app.

Does Next.js replace React?

No. Next.js is built on React, so you still write React components inside it. The framework adds routing, rendering, and data features around those components.

Should I learn React or Next.js first?

Learn React first. Components, JSX, props, and state are shared by both, and Next.js examples make much more sense once those basics are familiar.

Conclusion

React is the interface library and Next.js is the framework around it. Choose React when the interface is the whole problem, and Next.js when the app also needs routing, server rendering, a backend, or a production build.