React Router

Routing library for React with data loading, mutations, and an optional full-stack "framework mode".

Ask your AI about this, with this page as the source:ChatGPT ↗Claude ↗Perplexity ↗

React Router is the routing library for React, and since version 7 it is also a full-stack framework: Remix was merged into it, so the Remix framework continues under the React Router name. You can use as little or as much of it as you want.

It has three modes, each adding to the previous one. Declarative mode maps URLs to components with links and navigation hooks. Data mode moves route definitions outside of rendering and adds loaders, actions and pending states. Framework mode wraps that in a Vite plugin with a routes file, type-safe route modules, code splitting and a choice of rendering strategy. Loaders and actions work on standard Request, Response and FormData objects.

In framework mode you can server-render, pre-render chosen paths at build time, or ship a single-page app with server rendering turned off, and change your mind later without rewriting routes. Official templates cover Node with Docker (including a Postgres variant), and Vercel, Cloudflare and Netlify maintain their own. Middleware is part of the current major version.

The limits: React Server Components support is still experimental and can break in minor releases. Major upgrades depend on adopting future flags in advance, and v8 requires recent Node, React 19.2 and Vite 7, which may force other upgrades in an older codebase.

Where it fits

How React Router itself is built

4 tools, from its own code, website and Product Hunt page.

Who uses it

No maker's live product on record yet, and 377 open-source projects that declare it in their code.

Declared in code 377How evidence is collected →

We haven't found a maker's live product that uses React Router yet — only the open-source projects below, which declare it in their code.

Open source: a project that declares React Router as a dependency in its public code — verifiable, but not necessarily a live product.

Loved and watch-outs

Themes that recur in makers' words and Hacker News comments, each linked to what it summarises.

Most loved
  • Framework mode gives Remix-style loaders, server rendering and middleware on top of Vite with little overhead. HNHN 2HN 3
  • For client-only apps, Vite plus React Router just works with sane defaults. HNHN 2
  • Moving from Next.js cut one developer's deploy times from 7–8 minutes to 1–2. HN
Watch-outs
  • Repeated breaking changes across major versions leave teams with large upgrade work, and some have left for alternatives. HNHN 2HN 3HN 4
  • The Remix and React Router renaming history confuses people about which project is which. HNHN 2HN 3HN 4
  • Mixing server and client code in framework mode adds mental overhead, and registering API routes takes ceremony. HNHN 2

Reliability and open issues

Most wanted on GitHubOpen on 2026-10-04 in remix-run/react-router, with activity in the last year — issues and feature requests by 👍.

Who switches

Public pull requests on GitHub since Oct 2024 whose title says "X to Y" — real code changes moving a project from one tool to another, by developers in general. Open a row to see the pull requests.

Next.js → React Router25 PRs
React → React Router11+ PRs
React Router → Next.js49 PRs
React Router → TanStack Start7 PRs
React Router → Astro5 PRs

Alternatives to React Router

All alternatives by situation →

Questions makers ask about React Router

Which mode should I use?

The modes are additive. Framework mode suits most new apps and anyone comparing it with Next.js; data mode suits teams that want loaders and actions but their own bundling and server setup; declarative mode is plain client-side routing. source ↗

I have a Remix v2 app. Is this the same thing?

Yes. React Router v7 is the next major version of Remix v2, and if you have adopted the Remix future flags, upgrading is mostly a dependency change, with a codemod for packages and imports. source ↗

Can I build a single-page app with no server?

Yes. Setting ssr to false builds an index.html you can serve statically. The root route is still rendered once at build time, so your routes must not touch browser-only APIs during the first render. source ↗

Can I pre-render some pages as static HTML?

Yes. The prerender option renders listed paths at build time using the same loaders as server rendering, either alongside a runtime server or for a fully static deploy. source ↗

Where can I deploy it?

Anywhere that runs Node or Docker, such as Fly.io, Railway or Google Cloud Run, using the official templates, or to static hosting as a single-page app. Vercel, Cloudflare and Netlify maintain their own templates. source ↗

Does it support React Server Components?

Yes, in both framework and data modes, but the support is experimental and may change in minor or patch releases. source ↗

What does upgrading from v7 to v8 involve?

If you adopted the v7 future flags, the upgrade is mostly non-breaking. v8 requires Node 22.22 or later, React 19.2.7 or later and, in framework mode, Vite 7. source ↗

Is React Router free?

Yes — it is free, open-source software.

Is React Router open source or self-hostable?

Open source, and you can self-host it. source ↗

Can AI coding agents work with React Router?

No llms.txt, official MCP server or CLI found yet.

Who uses React Router?

No maker's live product we track yet; 377 open-source projects declare it in their code. source ↗