FrameworksMar 20263 min read

React vs Next.js: Stop Asking This Question

Next.js is built on React. You're not choosing between them — you're choosing whether to use a framework around React or not.

🧊Nice Pick

Next.js

For any production web app, start with Next.js. You get file-based routing, server components, API routes, image optimization, and deployment to Vercel or anywhere else — all configured and working in the time it takes to set up React Router manually. Bare React is for when you have a very specific reason to avoid a framework.

This Is Not a Fair Fight

React is a UI library. It renders components. That's its job.

Next.js is a React framework. It adds routing, server-side rendering, static generation, API routes, image optimization, font optimization, middleware, and a deployment target. It uses React to do all of this.

Asking 'React vs Next.js' is like asking 'engine vs car.' The question you're actually asking is: 'should I use Next.js, or should I use React with a different setup (Vite + React Router + whatever else I need)?'

Why Next.js Wins for Most Projects

File-based routing alone is worth it. Drop a file in app/dashboard/page.tsx and the route exists. No router configuration, no import, no registration. For a 20-page app, this saves hours of boilerplate.

Server Components (Next.js 13+) let you fetch data and render on the server without shipping that logic to the client. Your bundle stays small. Components that need user interaction opt into 'use client'. This model reduces JavaScript payload significantly — real users on real connections feel it.

The App Router in Next.js 15 has layouts, loading states, and error boundaries built into the file structure. Things that take 3 hours to set up correctly in a custom React setup take 10 minutes in Next.js.

When Bare React Makes Sense

Electron apps, React Native (mobile), heavily customized SPAs where you're fighting Next.js conventions, or apps that are just frontends for an existing API where SSR/SSG provides no benefit.

Also: if you already have a non-Next.js setup working and the switching cost is high, 'if it's not broken' applies. Migrating from CRA or Vite to Next.js App Router is real work.

Vite + React is the right choice if you want fast dev-server startup without Next.js's complexity. Vite's HMR is faster than Next.js's. For simple SPAs with client-side routing only, Vite + React Router is leaner.

The Next.js Gotchas

Next.js App Router has a learning curve. The mental model of Server Components vs Client Components trips people up. You'll accidentally try to use useState in a Server Component and get a cryptic error.

Build times on large Next.js apps get slow. Incremental builds help but you'll notice it on 100+ page apps.

Next.js is developed by Vercel, and the docs heavily feature Vercel deployment. You can self-host (the standalone output mode works well), but it takes more config. Some features — Image Optimization, ISR — work best on Vercel's infrastructure.

Quick Comparison

FactorReactNext.js
RoutingManual (React Router or TanStack)File-based, built-in
SSR / SSGManual setup requiredFirst-class, multiple strategies
Bundle SizeDepends on setupOptimized by default (Server Components)
Dev Server SpeedVite: very fastFast, but Vite faster
Learning CurveLower (just React)Higher (React + framework concepts)
Deployment ComplexityStatic file, trivialNeeds Node.js server or platform
SEO Out of BoxPoor (SPA default)Excellent (SSR/SSG default)

The Verdict

Use React if: You're building an Electron app, a mobile app with React Native, a simple SPA where SEO doesn't matter, or you have specific architectural reasons to avoid the framework.

Use Next.js if: You're building a production web app. Almost every production web app. Start here unless you have a specific reason not to.

Consider: If you're learning React, start with Vite + React to understand the library. Once you understand it, move to Next.js for anything real.

🧊
The Bottom Line
Next.js wins

For any production web app, start with Next.js. You get file-based routing, server components, API routes, image optimization, and deployment to Vercel or anywhere else — all configured and working in the time it takes to set up React Router manually. Bare React is for when you have a very specific reason to avoid a framework.

Related Comparisons

Disagree? nice@nicepick.dev