Next.js vs React 2026 — Which Should You Learn First?

Photo: Bibek ghosh / Pexels
Next.js is not "instead of" React. It is React plus a framework around it. The Next.js documentation describes itself in exactly those terms: "a React framework for building full-stack web applications," where "you use React Components to build user interfaces, and Next.js for additional features and optimizations" (Next.js docs). Every Next.js app is a React app. The real question is not "Next.js or React?" but "React on its own with tools I choose, or React inside a framework that has made those choices for me?"
This guide answers that question using the official React and Next.js documentation as the reference point, explains what each piece actually does, and gives a practical learning order for 2026. Where we give an opinion, we say so.
The Short Answer
Learning order:
- React fundamentals first. Components, props, state, effects, lists and forms. The Next.js docs themselves list React as prerequisite knowledge and point beginners to a React foundations course before the framework.
- Then a framework for real projects. Next.js is the most widely documented choice, and the React team lists it first among its recommended frameworks.
Don't: try to learn Next.js without understanding React. Many things that look like Next.js features (hooks, Suspense, Server Components) are React features, and you will not be able to tell which layer is responsible when something breaks.
For a new production project in 2026: the React documentation says to start with a framework, and names Next.js (App Router), React Router (v7) and Expo (for native apps) (react.dev, Creating a React App). A build tool such as Vite on its own is the supported route when you have unusual constraints, want to build your own framework, or are learning.
What React Is
React is a JavaScript library for building user interfaces out of components. A component is a function that takes inputs (props) and returns a description of what should appear on screen. When state changes, React works out what needs to change in the page and updates it. React is also the base for component collections such as shadcn/ui.
// Pure React - just UI
import { useState } from 'react';
function Counter() {
const [count, setCount] = useState(0);
return (
<div>
<p>Count: {count}</p>
<button onClick={() => setCount(count + 1)}>+</button>
</div>
);
}
What React on its own does not decide for you:
- Routing: which URL shows which screen.
- Data fetching strategy: when and where data loads.
- Code splitting: how the JavaScript bundle is divided.
- Server rendering: whether HTML is produced on a server or at build time.
- Build configuration: bundling, compiling TypeScript and JSX, optimizing assets.
React provides primitives for several of these (for example Suspense, React.lazy, and Server Components), but something has to wire them together. That "something" is either a framework or a set of libraries you assemble yourself.
React's recent history, in dates
| Date | Event | Source |
|---|---|---|
| May 3, 2023 | React introduces its Canary release channel so frameworks can adopt features like Server Components before a stable release | react.dev blog |
| Dec 5, 2024 | React 19 becomes stable, including Actions, useActionState, useOptimistic, use, Server Components and Server Functions, and ref as a prop |
react.dev blog |
| Feb 14, 2025 | The React team deprecates Create React App for new apps and recommends frameworks instead | react.dev blog |
| Oct 1, 2025 | React 19.2 adds <Activity>, useEffectEvent and other features |
react.dev blog (as referenced in the Next.js 16 post) |
The February 2025 deprecation is the clearest statement of where React itself stands. The React team explained that Create React App "has no active maintainers," that build-only setups leave routing, data fetching and code splitting unsolved, and that solving them yourself tends to produce bespoke, hard-to-maintain solutions. Their recommendation for new apps is a framework.
What Next.js Is
Next.js is a framework built on React, created and maintained by Vercel. The Next.js 13.4 announcement recalls that the project was released in 2016 "to provide an easy way to server-render React applications" (Next.js 13.4 blog). The docs say it "automatically configures lower-level tools like bundlers and compilers."
In practice, Next.js adds:
- File-system routing: folders and files under
app/(orpages/) become URLs. - Layouts: nested, persistent UI shells shared between routes.
- Rendering choices per route: prerendering at build time, rendering on each request, or streaming parts of a page progressively.
- Data fetching integrated with the router, including caching and revalidation APIs.
- Route handlers: server endpoints that live in the same project as your pages.
- Server Functions (Server Actions): functions that run on the server and can be called from forms and client components.
- Built-in components for images (
next/image), fonts, links and scripts. - A bundler setup: Turbopack has been the default bundler for new projects since Next.js 16 (Next.js 16 blog).
// Next.js App Router page (app/page.js)
// Pages and layouts are Server Components by default.
export default async function HomePage() {
const res = await fetch('https://api.example.com/products');
const products = await res.json();
return (
<main>
<h1>Products</h1>
<ul>
{products.map((p) => (
<li key={p.id}>{p.name}</li>
))}
</ul>
</main>
);
}
That async component is ordinary React (a Server Component). Next.js's role is deciding when it runs, routing the URL / to it, caching the result if you ask it to, and sending the output to the browser.
Next.js milestones, in dates
| Date | Release | What changed | Source |
|---|---|---|---|
| 2016 | First release | Easy server rendering for React | Next.js 13.4 blog |
| May 4, 2023 | Next.js 13.4 | App Router declared stable; Turbopack beta; Server Actions alpha | Next.js 13.4 blog |
| Oct 21, 2025 | Next.js 16 | Turbopack stable and default; Cache Components; middleware.ts renamed to proxy.ts; React 19.2 features; Node.js 20.9+ required |
Next.js 16 blog |
An earlier version of this article said the App Router became stable in "late 2023". The official announcement dates it to May 2023, with Next.js 13.4.
React vs Next.js at a Glance
| Question | React (library) | Next.js (framework on React) |
|---|---|---|
| What is it? | A library for building UI from components | A React framework for full-stack web apps |
| Who maintains it? | The React team (open source, originally from Meta) | Vercel (open source) |
| Routing | Not included; add a router such as React Router | Built in, file-system based |
| Server rendering | Provides APIs; you set up a server or framework | Built in: prerender, per-request, or streaming |
| Server Components | Defined by React; needs a framework or bundler integration | Default in the App Router |
| Data fetching | Your choice of library or pattern | Integrated with routing and caching |
| Build tooling | Your choice: Vite, Parcel, Rsbuild | Configured for you (Turbopack by default in v16) |
| Deployment | Static files on any host (for a client-only app) | Node.js server, Docker, or static export |
| Mobile apps | React Native / Expo | Not a mobile framework |
The table reflects what each project documents, not a quality judgment. Both are tools; which is "better" depends entirely on the application.
Server Components: The Biggest Conceptual Shift
React Server Components are the most important idea to understand in modern React, and they are also the most common source of confusion between the two projects.
What they are (React's definition)
The React reference defines Server Components as "a new type of Component that renders ahead of time, before bundling, in an environment separate from your client app or SSR server" (react.dev, Server Components). That environment can be your build machine, running once at build time, or a web server, running on each request.
Key facts from the React docs:
- There is no directive for Server Components. The React docs call it "a common misunderstanding" that
"use server"marks a Server Component."use server"marks Server Functions. Client Components are marked with"use client". - Server Components can be
async. You canawaitdata directly in the component body; React suspends until the promise resolves. - Their code is not shipped to the browser. Libraries they import, such as a Markdown parser, stay on the server; the client receives only the rendered result.
Why Next.js is associated with them
Server Components are a React feature, but they need deep integration with a bundler and router to work. The React docs say plainly that "at the moment, the Next.js App Router is the most complete implementation" of the React Server Components specification (react.dev). That is why many developers first meet Server Components through Next.js and assume they are a Next.js invention.
How the boundary works in Next.js
According to the Next.js docs on Server and Client Components:
- Pages and layouts are Server Components by default.
- Adding
"use client"at the top of a file declares a boundary: that file, its imports and the components it renders directly go into the client bundle. - Server Components passed as
childrenor other props to a Client Component are not pulled into the client bundle; they are rendered on the server and passed in as output. - Props passed from Server to Client Components must be serializable by React (no functions, for example, except Server Functions).
- React context is not supported in Server Components, so context providers live in Client Components that wrap
children.
The Next.js docs give a clear rule of thumb. Use Client Components when you need state and event handlers, lifecycle logic such as useEffect, browser-only APIs such as localStorage or window, or custom hooks. Use Server Components to fetch data close to its source, keep API keys and secrets off the client, reduce the JavaScript sent to the browser, and improve First Contentful Paint by streaming content.
// app/[id]/page.tsx — Server Component (default)
import LikeButton from '@/app/ui/like-button';
import { getPost } from '@/lib/data';
export default async function Page({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const post = await getPost(id);
return (
<main>
<h1>{post.title}</h1>
<LikeButton likes={post.likes} />
</main>
);
}
// app/ui/like-button.tsx — Client Component
'use client';
import { useState } from 'react';
export default function LikeButton({ likes }: { likes: number }) {
const [count, setCount] = useState(likes);
return <button onClick={() => setCount(count + 1)}>{count} likes</button>;
}
Note the await params in the page. Since Next.js 16, params, searchParams, cookies() and headers() must be accessed asynchronously; the synchronous form was removed (Next.js 16 blog). Older tutorials that destructure params directly will not work unchanged on Next.js 16.
What actually reaches the browser
The Next.js docs describe a three-step process on first load. The server renders Server Components into the RSC Payload, a compact serialized description of the rendered tree with placeholders for Client Components. The browser then (1) shows the prerendered HTML immediately as a non-interactive preview, (2) uses the RSC Payload to reconcile the server and client trees, and (3) runs JavaScript to hydrate Client Components, which attaches event handlers and makes them interactive. On later navigations, the RSC Payload is prefetched and cached, and Client Components render entirely in the browser.
If you want to understand the browser side of that process (parsing, layout, paint), see How Browsers Render Web Pages.
A security note the docs emphasize
Because the same JavaScript module can be imported by both server and client code, it is possible to import server-only code into the client by accident. Next.js only exposes environment variables prefixed with NEXT_PUBLIC_ to the browser; others are replaced with an empty string in client bundles. The docs recommend importing the server-only package in modules that must never run in the browser, which turns an accidental client import into a build-time error.
App Router vs Pages Router
Next.js has two routers, and both are still documented. The docs describe them this way (Next.js docs):
- App Router: "the newer router that supports new React features like Server Components." Lives in the
app/directory. - Pages Router: "the original router, still supported and being improved." Lives in the
pages/directory.
App Router (app/) |
Pages Router (pages/) |
|
|---|---|---|
| Default component type | Server Components | Client-rendered React components (with server data functions) |
| Data fetching | async components, fetch, caching APIs |
getStaticProps, getServerSideProps, getInitialProps |
| Layouts | Nested, composable layout.js files |
Single _app.js wrapper; no nested layouts |
| Streaming and Suspense | Built in | Limited |
| React version | Uses React canary releases built in | Uses the React version in your package.json |
| Status | Recommended for new apps since 13.4 | Supported; incremental migration possible |
When the App Router became stable, the Next.js team wrote: "Starting today, we recommend building new applications with the App Router," and committed to supporting pages/ "for multiple major versions moving forward." They also stated that "using both pages/ and app/ in production together is supported," so an existing project can migrate one route at a time (Next.js 13.4 blog).
Practical advice: start new projects with the App Router. Do not rewrite a working Pages Router app just to modernize it; migrate route by route when a feature would genuinely benefit. If you are working on a Next.js 15 codebase specifically, our Next.js 15 developer's guide covers that version's App Router and Turbopack details.
Rendering Strategies Explained
Much of the practical difference between "React alone" and "Next.js" comes down to where and when HTML is produced. These terms appear in both the React and Next.js docs:
- Client-side rendering (CSR): the server sends a mostly empty HTML file plus JavaScript; the browser builds the page. This is what a plain Vite + React app does by default.
- Static prerendering (often called SSG): HTML is generated at build time and served as files. Fast to serve and cache, but the content is fixed until the next build or revalidation.
- Server-side rendering per request (SSR): HTML is generated on the server for each request, so it can include personalized or fresh data.
- Streaming: the server sends HTML in chunks as each part becomes ready, with Suspense boundaries showing fallback UI (such as a skeleton) in the meantime.
- Partial prerendering / Cache Components: in Next.js 16, a static shell is prerendered while dynamic parts stream in; caching is opt-in through the
"use cache"directive (Next.js 16 blog).
The React team's Create React App post makes the point that frameworks let you "pick the right rendering strategy for each page in your app," including client-side rendering, static generation or server rendering. That flexibility, per route rather than per app, is a large part of what a framework offers.
Does server rendering help SEO?
Search engines can render JavaScript, but delivering meaningful HTML in the initial response removes a dependency on that rendering step and lets content appear sooner for users. That is a general web principle rather than something specific to Next.js; any setup that prerenders or server-renders HTML gets the same benefit. We do not publish benchmark numbers here because results depend heavily on the application, hosting and measurement method. If page speed is your concern, measure your own site with Core Web Vitals; our web performance optimization guide explains how.
When to Use React Without a Framework
The React docs support starting "from scratch" with a build tool such as Vite, Parcel or Rsbuild in three situations: your app "has constraints not well-served by existing frameworks," you prefer to build your own framework, or you are learning the basics. The docs warn that this "does require that you make choices on which tools to use for routing, data fetching, and other common usage patterns." Not every project needs a JavaScript UI framework; see what HTMX is and how its hypermedia approach works.
Typical cases where that trade-off makes sense:
1. Client-only applications behind a login
- Internal dashboards, admin panels, in-browser editors.
- Search visibility does not matter, and all data is user-specific.
2. Embedded widgets
- React components mounted inside an existing non-React page.
3. Learning
- Building small apps without a framework makes it obvious what React itself does.
4. Apps with unusual hosting constraints
- For example, a static host with no server at all. (Note that Next.js also supports static export, so this alone is not a decisive reason.)
npm create vite@latest my-app -- --template react-ts
A common minimal stack is Vite + React + React Router (as a library) + a data-fetching library. It is lean and flexible, but you own every integration decision.
When to Use Next.js
Next.js is a strong default when:
1. Pages must be visible to search engines and fast on first load. Marketing sites, blogs, documentation and e-commerce benefit from prerendered or server-rendered HTML. 2. You want backend code in the same project. Route handlers and Server Functions let a single codebase cover both UI and server logic. 3. Data should be fetched on the server. Secrets stay on the server, and data can be fetched close to the database. 4. You want sensible defaults for images, fonts and bundling rather than configuring them yourself. 5. Different routes need different rendering strategies, such as a static landing page next to a dynamic dashboard.
Next.js is not the only framework that does these things. The React docs list React Router (v7) as a framework option (it absorbed what used to be the Remix framework), Expo for native mobile apps, and "up-and-coming" options including TanStack Start and RedwoodSDK. If you are deciding between React and other UI libraries altogether, see React vs Vue vs Svelte 2026.
Deployment: What Each Needs
| Setup | What you deploy | Typical hosts |
|---|---|---|
| React + Vite (client-only) | Static HTML, CSS and JavaScript files | Any static host or CDN |
| Next.js with server features | A Node.js server or Docker container | Vercel, other managed platforms, your own server |
| Next.js static export | Static files (no server-only features at request time) | Any static host or CDN |
The React docs note that Next.js "can be deployed to any hosting provider that supports Node.js or Docker containers, or to your own server," and that its static export "doesn't require a server." Vercel, which maintains Next.js, offers a managed platform, but it is not required. Next.js 16 also introduced an alpha Build Adapters API intended to help other deployment platforms integrate with the build. For a first deployment walkthrough, see Deploy a Website for Beginners.
Real Projects: When to Use What (Our Recommendations)
These are editorial recommendations, not benchmarks.
- Personal portfolio or small static site: either works; a static export or a content-focused tool is often simplest.
- Blog, documentation or editorial site: Next.js, for prerendering and SEO-friendly HTML.
- E-commerce storefront: Next.js or React Router framework, for server rendering and data loading.
- Internal dashboard behind authentication: React + Vite is often enough; Next.js is fine if you also want server-side data access.
- Form-heavy, data-mutation-heavy app: Next.js with Server Functions, or React Router with its loaders and actions.
- Native mobile app: Expo (React Native), which the React docs list for that purpose.
- Embeddable widget: plain React.
Learning Path
Stage 1: Web and React fundamentals
- HTML, CSS and modern JavaScript (see HTML, CSS, JavaScript Fundamentals).
- Components, props, state, conditional rendering and lists.
useState,useEffect,useContext,useRef.- Forms and event handling.
- Build: a calculator, a to-do app, a quiz.
Stage 2: React patterns
- Custom hooks.
- Client-side routing with a router library.
- Server-state libraries for caching API data.
- TypeScript with React.
- Suspense and error boundaries.
- Build: a small single-page app against a public API.
Stage 3: Next.js App Router
- File-system routing, dynamic segments, layouts.
- Server vs Client Components and the
"use client"boundary. - Data fetching in Server Components, loading and error files.
- Server Functions for forms.
- Build: a blog or a simple store.
Stage 4: Production concerns
- Authentication, database access, and type-safe APIs (for example tRPC).
- Caching and revalidation.
- Deployment and monitoring.
- Styling at scale; many Next.js templates use Tailwind CSS, and
create-next-appincludes it by default as of Next.js 16. - Build: a real application end to end.
There is no fixed number of weeks per stage. People with prior JavaScript experience move through stage 1 far faster than complete beginners. For the wider roadmap, see the Complete Web Development Learning Path 2026.
Common Mistakes
1. Learning Next.js before React. You will confuse framework conventions with React concepts, and debugging becomes guesswork.
2. Marking everything "use client". It works, but you lose the main benefit of Server Components. The Next.js docs recommend adding "use client" to the specific interactive components, not to large parts of the tree.
3. Thinking "use server" marks a Server Component. It does not; it marks a Server Function. Server Components are the default in the App Router and have no directive.
4. Leaking secrets. Importing a module that reads a secret into a Client Component does not expose the secret value (non-NEXT_PUBLIC_ variables are emptied in client bundles), but it breaks the code silently. Use server-only.
5. Following outdated tutorials. Many guides predate Next.js 16 and still use synchronous params, middleware.ts or webpack-specific configuration. Check the version a tutorial targets.
6. Using useEffect for all data fetching. The React team's own post on Create React App warns that fetching in effects causes network waterfalls; frameworks fetch data at the route level in parallel with code loading.
7. Picking a tool before writing down requirements. Decide whether you need SEO, server logic, static hosting or native mobile first, then choose.
FAQ
Q: Is Next.js a replacement for React? A: No. Next.js is a framework built on React. You still write React components; Next.js adds routing, rendering strategies, data fetching integration and build tooling around them.
Q: Is Next.js a backend framework? A: Partly. Route handlers and Server Functions let you run server code in the same project, and Server Components can read from a database directly. Teams with large, separate APIs often still run a dedicated backend alongside it.
Q: Are Server Components a Next.js feature? A: No, they are a React feature. React's own documentation says the Next.js App Router is currently the most complete implementation, which is why the two are often associated.
Q: Is Create React App still a good way to start? A: No. The React team deprecated Create React App for new apps on February 14, 2025, and recommends starting with a framework such as Next.js, React Router or Expo, or with a build tool such as Vite if you need a custom setup.
Q: Should I use the App Router or the Pages Router? A: For new projects, the App Router, which Next.js has recommended since version 13.4 in May 2023. The Pages Router is still supported, and both can run in the same app, so existing projects can migrate gradually.
Q: Do I have to deploy Next.js on Vercel? A: No. Next.js runs on any host that supports Node.js or Docker, on your own server, or as a static export for features that do not need a server at request time.
Q: Should I learn class components?
A: Only enough to read old code. Current React documentation teaches function components and hooks, and new features such as Server Components and use are built around functions.
Related Articles
- Complete Web Development Learning Path 2026
- Best Web Development Tools 2026
- HTML, CSS, JavaScript Fundamentals
- Web Performance Optimization
- Web Development Job Market 2026
Bottom Line
Learn React first, then learn a framework, and for most web projects that framework will be Next.js. That ordering matches the documentation of both projects: Next.js lists React as prerequisite knowledge, and React recommends starting new apps with a framework. Choose plain React with a build tool when you are learning, embedding, or have constraints a framework does not serve well. Choose Next.js when you want routing, server rendering, server-side data access and sensible build defaults decided for you.
Sources
- Next.js Docs, What is Next.js? and Server and Client Components
- Next.js Blog, Next.js 13.4 (May 4, 2023) and Next.js 16 (October 21, 2025)
- React Docs, Creating a React App and Server Components
- React Blog, React v19 (December 5, 2024) and Sunsetting Create React App (February 14, 2025)
Last verified: October 2026
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles

Web Development Portfolio — 5 Projects That Get Hired
5 web development portfolio projects to get hired: beginner to advanced, GitHub best practices, README template, deployment, and recruiter-tested tips.

Tailwind CSS Explained — Why It Dominates Web Design 2026
Tailwind CSS for beginners: why utility-first CSS won, common patterns, integration with React/Next.js, gotchas. The CSS framework everyone uses in 2026.

React vs Vue vs Svelte 2026 — Which Framework to Learn?
Compare React, Vue, Svelte side-by-side. Job market demand, learning curve, salary, real-world usage. Which one to choose.

Next.js 15: The Developer's Guide to App Router, Server Components, and Turbopack
Next.js 15 shipped in October 2024 and made the App Router the official default for new projects, stabilized Turbopack for development builds, and introduced async request APIs that changed how developers access cookies, headers, and search parameters. Next.js 16 (October 2025) extended Turbopack to production. This guide covers the concepts, architecture decisions, and practical trade-offs of the Next.js 15 era, which remains the most widely deployed major version.

What Is HTMX? Hypermedia for Modern Web
HTMX explained: how this 14KB library lets you build dynamic web apps with HTML attributes instead of a JavaScript framework, plus how it actually works.

htmx vs React 2026 — When to Skip the JavaScript Framework
htmx vs React in 2026: how server-sent HTML fragments compare with client-rendered JavaScript, where each fits, and what a documented React-to-htmx port saved.