The Relationship, Stated Precisely
React is a library for building interfaces. It gives you components, a reconciliation algorithm, hooks, and a virtual DOM — and nothing else. It has no router, no server, no build pipeline, no opinion about where data comes from, and no opinion about whether your content should exist before a user loads it.
Next.js is a framework built on React. It adds routing, server rendering, static generation, image optimisation, API routes, and a production build configuration. It does not replace React; every Next.js page is still a React component tree.
That distinction matters because "React versus Next.js" is really a comparison between a component library and a deployment model. You can use React inside Next.js, and you can render React on a server yourself with a framework like Vite plus a small Node service. The question is which pieces you want to assemble yourself.
The Comparison Table
| Concern | React alone | Next.js |
|---|---|---|
| Unit of deployment | A static bundle plus your own API server | One application, optionally one container |
| Default rendering | Client-side in the browser | Server components by default, per component |
| Routing | Install and configure React Router | File system under app/ or pages/ |
| Data fetching | Manual, in effects, on the client | await inside server components, streamed |
| HTML for a crawler | Empty shell plus JavaScript | Complete markup on first byte |
| SEO | Needs extra work | Metadata API, sitemap, structured data support |
| API layer | You build and host it | Route handlers in the same codebase |
| Image handling | Third-party library or manual | Built-in optimiser component |
| Caching model | Yours to invent | Explicit per-route and per-fetch rules |
| Bundle discipline | Manual code splitting and lazy loading | Automatic server/client boundary |
| Hosting | Any static host plus a server | Vercel, containers, or any Node host |
| Time to first deploy | Days of plumbing | Same day for a standard stack |
The row that decides most decisions is HTML for a crawler. It is also the row most teams underestimate.
Rendering Strategies
Client-Side Rendering — the React Default
Plain React ships an HTML document with a root element and a script tag. The browser downloads the bundle, executes it, and paints. It is fast for an application that opens after login and never needs to be indexed, and it is genuinely simpler: one rendering model, no cache to invalidate, no server to keep warm.
The cost shows up on a cold load on a mid-range Android phone. The Core Web Vitals guidance from web.dev puts a firm number on that cost: Largest Contentful Paint should land under 2.5 seconds at the 75th percentile. A client-rendered app spends a meaningful share of that budget downloading and parsing JavaScript before it can paint the headline.
Data fetching has the same shape. In plain React you call fetch inside an effect and manage loading, error, and race conditions by hand; the pattern is documented on MDN under using the Fetch API, but the doc cannot show you that you also have to abort the previous request when the query key changes. Next.js removes that entire category of bug for server-rendered routes, which is a larger win than the rendering speedup itself.
Server-Side Rendering
Each request runs on the server, which fetches data, renders, and returns complete HTML. Content is paintable almost immediately and indexable without executing JavaScript. Next.js calls this dynamic rendering, and it is what you get when a route reads uncached data.
Static Site Generation
At build time, each route is rendered once to HTML and shipped to a CDN. This is the fastest and cheapest option in wall-clock terms — no compute per request, no cold start — and it suits documentation, marketing pages, and blog content that changes on a human timescale. If you write your own posts as data files, pre-rendering them at build time is the cheapest SEO win available.
The constraint to know before you commit: every dynamic route must be enumerable at build time, or listed in generateStaticParams. A route parameter like /invoices/[id] cannot be pre-rendered for a million invoices, which is why product and marketing pages go static while account pages do not.
Incremental Static Regeneration
Static pages with an expiry. The first request after the interval triggers a background regeneration; everyone continues to receive the cached version while it happens. No request ever waits for the rebuild, which is what makes it safe for a page you cannot afford to fail.
typescript// app/products/[slug]/page.tsx export const revalidate = 3600; // regenerate at most hourly export async function generateStaticParams() { const slugs = await db.product.findMany({ select: { slug: true } }); return slugs.map(({ slug }) => ({ slug })); } export default async function ProductPage({ params }: { params: Promise<{ slug: string }> }) { const { slug } = await params; const product = await db.product.findUnique({ where: { slug } }); if (!product) notFound(); return <ProductDetail product={product} />; }
Server Components vs Client Components
This is the difference that has no equivalent in plain React, and it is the one worth understanding before choosing a framework at all.
A Server Component runs only on the server. It can read a database, call a private API with a service key, and its code never reaches the browser bundle. A Client Component runs in the browser, holds state, and attaches event handlers. You mark the boundary with a single directive, documented in the React Server Components reference and the use client directive docs.
tsx// Server Component — no "use client", no bundle cost export default async function InvoicePage({ id }: { id: string }) { const invoice = await db.invoice.findUniqueOrThrow({ where: { id } }); return ( <main> <InvoiceHeader invoice={invoice} /> <DownloadButton invoiceId={invoice.id} /> </main> ); }
tsx"use client"; import { useState } from 'react'; export function DownloadButton({ invoiceId }: { invoiceId: string }) { const [busy, setBusy] = useState(false); return ( <button disabled={busy} onClick={async () => { setBusy(true); await fetch('/api/invoices/' + invoiceId + '/pdf'); setBusy(false); }} > {busy ? 'Preparing…' : 'Download PDF'} </button> ); }
Two rules follow. Push "use client" as far down the tree as you can, because everything under it ships to the browser. And pass data across the boundary as plain serialisable props — you cannot hand a database handle or a server-only function to a Client Component.
Routing
React has no router. You install React Router and declare every route as a JavaScript object, which is fine at ten routes and unpleasant at two hundred, since the URL structure stops being greppable and drift between routes and files goes unnoticed.
Next.js derives routes from the file system. app/blog/[slug]/page.tsx becomes /blog/:slug, app/(marketing)/pricing/page.tsx becomes /pricing, and the folder name in brackets is a parameter the page receives. Route groups keep a shared layout without adding a path segment. The App Router documentation is the reference for nesting, layouts, and loading states.
Deployment
| Deployment target | React (Vite build) | Next.js |
|---|---|---|
| Static host | Native | Supported with output export constraints |
| Node container | Needs a second process for the API | Single process |
output: 'standalone' | Not applicable | Small image, no bundled node_modules |
| Edge runtime | Manual | Per-route middleware option |
| Incremental rebuilds | Not available | Built in via revalidate |
| Preview deployments | Manual | Standard on hosting platforms |
ts// next.config.ts import type { NextConfig } from 'next'; const nextConfig: NextConfig = { output: 'standalone', poweredByHeader: false, compress: true, images: { formats: ['image/avif', 'image/webp'], remotePatterns: [{ protocol: 'https', hostname: 'cdn.example.com' }], }, async headers() { return [ { source: '/:path*', headers: [ { key: 'X-Content-Type-Options', value: 'nosniff' }, { key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' }, ], }, ]; }, }; export default nextConfig;
When React Alone Is the Right Call
Choose plain React when the application is used after login and never indexed, when you already have a mature API and want the frontend to stay a thin client, or when the deployment target is an embedded surface — a dashboard inside someone else's shell, a browser extension, a widget. A design system published as React components for other teams to consume is also a good React-only project; you would not ask consumers to adopt a framework to render your library.
A second good reason is the team's own capacity. A framework is a dependency with opinions, a changelog, and breaking changes on a schedule someone else controls. If the team already knows the ecosystem deeply and has no public surface, buying that maintenance is not worth it.
When Next.js Is the Right Call
Choose Next.js when the same codebase contains both public, indexable pages and authenticated application pages; when you want one deployable unit instead of a frontend and an API; when image-heavy pages need automatic optimisation and format negotiation; or when the team needs caching, metadata, and routing decided for it rather than argued about. The marketing site and the app sharing one component library and one deploy is the pattern we see win most often.
The cost is real and should be stated: you are adopting a framework's conventions, release cadence, and caching semantics. For a codebase that already works and has no SEO requirement, that trade is not obviously worth making.
How We Make This Decision at Ullass
Our default for a new commercial web product is Next.js on the App Router, because the public surface needs server-rendered HTML and the private surface needs interactivity, and one framework serves both without a second deployment. We reach for plain React only in the embedded-surface cases above.
That default, along with the deployment and caching work that follows from it, is what our web development service covers end to end. If you are weighing it for an existing codebase rather than a greenfield build, talk to us — the honest answer is often "keep React and fix the rendering on three routes", and we will say so.
See how our full service lineup fits around it, or read how we put Next.js and a Postgres backend together in building a web app with Next.js and Supabase.