Next.js vs React Router
Next.js: React teams building full-stack apps with mixed static and dynamic pages.; React Router: React apps that want web-standard data loading without a heavier framework.
| Field | Next.js | React Router |
|---|---|---|
| Pricing | Open source | Open source |
| Open source | Yes | Yes |
| Self-hostable | Yes | Yes |
| Ecosystem | JavaScript / TypeScript | JavaScript / TypeScript |
| License | MIT | MIT |
| Category | Web frameworks | Web frameworks |
Choose React Router over Next.js when
Choose it when you want to keep React and build around route loaders and actions in a Vite-based framework.
React Router's Framework Mode adds a Vite plugin to its data router and supports client rendering, server rendering and static prerendering. React Router modes Define data reads with route loaders and use route actions for mutations that trigger revalidation of loader data. Loading data Route actions
SourceChecked 28 November 2026
Choose Next.js over React Router when
Choose it for a full-stack React app that uses Server Components for data access and Client Components for browser interactivity.
The Next.js App Router renders layouts and pages as Server Components by default. Server and Client Components Use Client Components for state, event handlers or browser APIs. That split lets you fetch data on the server and put interactive controls inside the resulting page. Component boundaries
SourceChecked 28 November 2026
Next.js
A React framework with file-based routing, server components, server rendering and static generation.
Choose Next.js if
React teams building full-stack apps with mixed static and dynamic pages.
Why it’s here
Next.js is a React framework with a file-system router. In the App Router, layouts and pages are Server Components by default. They can read from a database or API on the server, and they can render Client Components for state, event handlers and browser APIs. Installation guide Server and Client Components
Pick it when
- You want to keep data access near the React component that consumes it. A Server Component can fetch data and pass serializable props into a Client Component that owns the interactive part of the view. Component boundaries
- You want to ship a React site to a static host and can calculate its route output at build time. With static exports, eligible Server Components run during the build and Next.js writes HTML for direct visits and a static payload for navigation. Static exports
- You need a deployment that can run Next.js on infrastructure you control. The deployment guide supports running it as a Node.js server or in Docker and documents which deployment options support the framework's server features. Deployment options
Skip it when
- Your host can only serve static files and your pages need to read request cookies or execute Server Actions. Those features require a deployment that runs server code. Static export limitations
Current state
The npm registry's latest release is Next.js 16.4.6, published November 9, 2026. npm registry Next.js uses the MIT licence. Next.js licence
Setup
The installation guide specifies Node.js 20.9 or later. Run npx create-next-app@latest my-app, choose the defaults for the App Router if they fit your project, then run npm run dev from the new directory. Installation guide
Watch out for
Next.js 16 makes Turbopack the default for development and builds, so an existing custom Webpack configuration can cause the build to fail unless you migrate the configuration or select Webpack explicitly. Version 16 upgrade guide The same upgrade requires asynchronous access to request APIs such as cookies() and headers(), and to route inputs such as params where documented. Check those call sites during a migration. Request API migration
React Router
Routing for React that also works as a full framework with loaders, actions and server rendering (the successor to Remix).
Choose React Router if
React apps that want web-standard data loading without a heavier framework.
Why it’s here
React Router covers two common starting points for React apps. It can add URL matching and navigation to an existing application, or provide a framework that owns route loading, code splitting and rendering. Declarative Mode handles navigation and matching. Data Mode adds loaders and actions, and Framework Mode adds a Vite plugin and typed route APIs. React Router modes
Pick it when
- You already have a rendering setup and only want routes, active links and navigation inside the application. Declarative Mode exposes components and hooks for that job. Declarative Mode
- You want to organize reads and writes around routes. Loaders supply route data, while actions handle submissions and trigger revalidation so affected views can read updated data. You can adopt those APIs without taking on the Framework Mode build setup. Data Mode Data loading Actions
- Your React application needs static pages and responses rendered on the server for other routes. In Framework Mode, prerendering takes a list of URLs and can run alongside a deployment that renders requests on the server. Rendering strategies
Skip it when
- You need HTML rendered per request and deploy exclusively to a static file host. The framework can generate selected pages at build time, but request-time rendering requires a deployment that supports it. Rendering strategies
Current state
The npm registry's latest release is React Router 8.5.3, published November 24, 2026. npm registry React Router uses the MIT licence. React Router licence
Setup
For a Framework Mode project, run npx create-react-router@latest my-react-router-app, enter the new directory, install dependencies with npm i, and start it with npm run dev. Framework installation
Watch out for
React Router 8 removes the react-router-dom package. Check existing imports and the changelog's version requirements before upgrading. Version 8 changelog Prerendering runs route loaders at build time for the listed paths, so those loaders need access to their data during the build. Prerendering