Skip to content

Web

Next.js vs React: when you actually need Next.js

Next.js vs React explained: what Next.js adds on top of React, a side-by-side table, when plain React with Vite is the better fit, and our default rule.

By , Founder & CEOUpdated 8 min read

React is a UI library for building components; Next.js is a full framework built on React that adds routing, server rendering, data fetching, image optimization and a deployment model out of the box. Use plain React (with Vite) for internal tools and single-page apps that live behind a login; use Next.js for anything public that needs to be found on Google, load fast on first paint, or fetch data on the server.

What Next.js adds on top of React

React itself only renders components. Everything else an application needs (URLs, data loading, server rendering, asset handling, a way to deploy) comes either from a framework or from libraries you choose and wire together. React's own documentation recommends starting new apps with a framework and lists Next.js among them.

ConcernReact (e.g. Vite)Next.js
RoutingAdd a router yourself, such as React Router or TanStack RouterFile-based routing with nested layouts built in
RenderingClient-side by default; the browser builds the pageServer rendering, static generation or client rendering, chosen per route
Data fetchingIn the browser after load, usually with a library such as TanStack QueryServer Components fetch on the server, close to your data
SEOClient-only apps depend on crawlers running JavaScriptShips complete, crawlable HTML
Image optimizationYou wire it upnext/image resizes, serves modern formats and lazy-loads
Backend endpointsA separate API serverRoute handlers and server functions in the same codebase
DeploymentStatic files on any CDNNode.js server, Docker, static export or a platform adapter
Best forInternal tools, SPAs behind a loginPublic sites, marketing, SaaS front-ends

Routing

In a Vite project, routing is a library decision: you install a router, define routes and handle code splitting per route yourself. In Next.js, the folder structure is the route map. A file at app/pricing/page.tsx becomes /pricing, and a layout.tsx wraps every page beneath it, so shared navigation and nested dashboards come without extra wiring.

Rendering

This is the difference that matters most. A Vite app ships a near-empty HTML page and a JavaScript bundle; the browser then builds the page. Next.js can send finished HTML from the server, generate pages at build time, or regenerate them on a schedule, and you can mix these per route. Which mode fits which page is its own decision, covered in SSR vs SSG vs ISR.

Data fetching

In a client-only app, data loads after the JavaScript does, and components that fetch their own data often wait on each other. React's guide to building an app from scratch warns that "fetching data directly in components can lead to slower loading times due to network request waterfalls". Next.js Server Components fetch on the server before the HTML is sent, so the user receives the page with its data already in it.

Image optimization

The next/image component serves correctly sized images for each device in modern formats such as WebP, lazy-loads images as they enter the viewport and reserves their space to prevent layout shift. On a plain React app you can reach the same result with an image CDN and careful markup, but it is work you do on every page.

Deployment

A Vite build is a folder of static files you can put on any CDN or object store. Next.js can be deployed as a Node.js server, a Docker container, a static export or through a platform adapter. The trade-off: a static export does not support the features that need a server, so most Next.js apps need a host that runs Node.js or supports Next.js directly. We compare the options in where to host a SaaS.

Why rendering decides SEO

Google can index JavaScript apps, but it does so in stages. Its JavaScript SEO guide explains that pages wait in a render queue until "Google's resources allow" a headless browser to run the JavaScript, which can take seconds or longer. The same guide still calls server-side rendering or pre-rendering "a great idea", because "not all bots can run JavaScript."

Server-rendered HTML removes that uncertainty: titles, headings, body text and links are in the first response for every crawler, including those feeding AI answers. Our Next.js SEO checklist covers the rest of the work, and answer engine optimization covers being cited by AI search.

When plain React (with Vite) is the better fit

Next.js is not automatically the better choice. Plain React is simpler, and simpler is often right:

  • The app lives behind a login. Dashboards, admin panels and internal tools are never crawled, so server rendering buys little.
  • You already have a backend. If a separate API team owns the server, a static front end on a CDN is one less runtime to operate.
  • The app is mostly client-side state. Editors, canvas tools and data-heavy grids do their work in the browser after the first load.
  • You are embedding it. A widget or micro-frontend inside another product needs a small client bundle, not a framework.
  • You want the cheapest possible hosting. Static files cost almost nothing to serve and need no server to patch.

The catch is that a Vite project starts as a client-only single-page app with no routing, data fetching or rendering strategy included. React's documentation warns that adding those yourself "is often the same as building your own adhoc framework". That is fine for an internal tool with a few screens. It is a poor trade for a public product that will eventually need server rendering.

When you need Next.js

  • The site is public and must rank in search or AI answers.
  • First-load speed and Core Web Vitals matter: marketing sites, e-commerce, SaaS sign-up flows.
  • Content comes from a CMS and pages should be generated from it; see our headless CMS comparison.
  • You want server-side data fetching and rendering without wiring it up yourself.
  • One codebase should serve both the public marketing site and the logged-in app.

What Next.js costs you

There are real trade-offs. Your team has to learn the split between server and client components and how caching works, which is where most Next.js bugs come from. Server features need a host that supports them. And major versions arrive regularly, so upgrades need planned time. For a public product these costs are worth paying; for a five-screen internal tool they usually are not.

Which to pick, by project type

ProjectPickWhy
Marketing site or blogNext.jsStatic generation, crawlable HTML, image optimization
SaaS product with a public siteNext.jsOne codebase for marketing pages and the logged-in app
E-commerce storefrontNext.jsProduct pages must rank and load fast
Internal admin dashboardReact with ViteBehind a login; simplest build and hosting
Embeddable widgetReact with ViteSmall bundle, no server needed
Mobile appNeither: React NativeSee React Native vs Flutter

The one-question rule

Does this page need to be found and fast? If yes (it's public and SEO/first-load matters), reach for Next.js. If it lives behind a login and speed-to-index is irrelevant, plain React is simpler and perfectly fine.

Our default

We reach for Next.js for public products, marketing sites and SaaS front-ends where SEO and speed matter, and plain React with Vite for internal dashboards and tools behind a login. Our SaaS tech stack explains how Next.js fits with the database, auth and hosting choices around it. If you are weighing the decision for a specific product, book a discovery call.

Frequently asked questions

Do I need Next.js or just React?

Use plain React for internal tools and apps behind a login. Use Next.js for anything public that needs SEO, fast first loads, or server-side data fetching. It adds routing, server rendering, data fetching, image optimization and a deployment model on top of React.

Is Next.js good for SEO?

Yes. Next.js can server-render or pre-render pages and ship complete, crawlable HTML, which is far more reliable for SEO than a client-only React app that renders in the browser. Google can render JavaScript, but it does so later in a queue, and not every crawler runs JavaScript at all.

Is Next.js harder to learn than React?

If you know React, Next.js is an incremental step: you are mainly learning its routing, rendering modes, and data-fetching conventions. The core (components, hooks, JSX) is identical. The part that takes longest is understanding which code runs on the server and which in the browser.

Can I migrate a React app to Next.js later?

Yes, though it is real work: you migrate routing and adopt server rendering where it helps. Components usually move across with little change; routing, data fetching and anything that touches the browser directly need the most attention. It is easier to start on Next.js if you already know the app will be public and SEO matters.

Does Next.js replace my backend?

Partly. Next.js can handle server-side rendering, route handlers and server functions, which covers many needs such as form submissions and webhooks. Data-heavy or complex products still pair it with a dedicated backend and database, especially when a mobile app or third parties use the same API.

Can Next.js build a single-page app?

Yes. Next.js supports static exports, so you can start as a static site or single-page app on any static host and add server features later. A static export cannot use the features that need a server, so you give up server rendering on demand until you move to a host that runs Node.js.

Keep reading

Related articles.

Tell us what you are building.

Share a short brief and we will reply with next steps, usually within one working day.