How to Download and Install React Router (Step by Step)
Every way to get React Router running: one npm command, a new Framework Mode app, or an offline install from the downloaded package, with checks at each step.
Read MoreReact Router releases often. Since version 8.0.0 arrived on 17 June 2026 there have been five minor releases and several patches, and the 7.x line still gets fixes alongside it. This article explains what you actually get when you install a version, how the major React Router versions differ, and how to keep your project up to date without surprises.
Version facts were checked against the npm registry on 1 December 2026. The latest release at that time was 8.5.3, published on 24 November 2026.
React Router is not an installer or an app. It is a JavaScript package distributed through the npm registry as a gzipped tarball, a .tgz file. When you run npm i react-router, npm downloads that tarball, checks its integrity hash, and unpacks it into node_modules/react-router. The file on our download page is that same tarball.
Inside the 8.5.3 package you will find:
package.json: name, version, license, dependencies and the exports map that tells bundlers which file to load.dist/production and dist/development: the compiled library as ES modules. Bundlers pick the development build while you work (with helpful warnings) and the smaller production build when you ship..d.ts files: TypeScript type definitions, so there is no separate @types package.docs/: the documentation in Markdown, bundled with the release.CHANGELOG.md: every change, version by version.LICENSE.md and README.md.The package exposes a few entry points. react-router is the main one. react-router/dom holds DOM-specific pieces such as RouterProvider and HydratedRouter. Framework Mode tooling lives in separate packages: @react-router/dev, @react-router/node, @react-router/serve and others.
React Router follows semantic versioning (semver): MAJOR.MINOR.PATCH.
A package.json entry like "react-router": "^8.5.3" allows npm to install any later 8.x version, but never 9.0.
The registry also has dist-tags, named pointers to versions. latest points to 8.5.3, version-7 to 7.18.7, and version-6 to 6.30.6. That is why npm i react-router@7 works even though v8 is current. Tags such as pre, nightly and experimental are for testing upcoming changes, not for production.
| Version | Released | Headline changes |
|---|---|---|
| v6.0 | Nov 2021 | <Routes> replaced <Switch>, relative nested routes, useNavigate replaced useHistory, smaller bundle. |
| v6.4 | Sep 2022 | Data routers: createBrowserRouter, loaders, actions, Form and fetchers. |
| v7.0 | Nov 2024 | Remix merged in. Framework Mode with a Vite plugin, type-safe route modules, SSR and pre-rendering. Everything moved into react-router; react-router-dom kept as a re-export. |
| v8.0 | Jun 2026 | react-router-dom removed, ESM-only, middleware always on, minimums raised to React 19.2.7 and Node.js 22.22. |
| v8.5 | Oct 2026 | Router-level view transition APIs deprecated in favour of React's own <ViewTransition>. |
For most apps already on v7 with the future flags turned on, the v8 upgrade comes down to a few edits:
react-router-dom with react-router. Import RouterProvider and HydratedRouter from react-router/dom.context passed to loaders and actions is always a RouterContextProvider. Custom servers must return one from getLoadContext instead of a plain object.data argument is gone; use loaderData.future.v8_middleware and the other v8_ flags from your config, since their behaviour is now the default.Switch, useHistory and route definitions.Every release is described in CHANGELOG.md, which ships inside the package, so you can read it offline in node_modules/react-router/CHANGELOG.md. Entries are grouped into Major, Minor and Patch changes, plus an "Unstable Changes" section for experimental APIs whose names start with unstable_. Those can change in any release, so avoid them in production code unless you are prepared to update them.
npm outdated react-router
This shows your current version, the newest version your semver range allows ("Wanted") and the newest version overall ("Latest").
Open node_modules/react-router/CHANGELOG.md after updating, or read the release notes first. Look for "Major Changes" and anything marked as a deprecation.
# Library modes
npm i react-router@latest
# Framework Mode: keep every package on the same version
npm i react-router@latest @react-router/node@latest @react-router/serve@latest
npm i -D @react-router/dev@latest
Mismatched versions between react-router and the @react-router/* packages cause confusing type and build errors, so update them in one go.
Run your type check, tests and a production build. Click through the main flows. Commit the updated lockfile so the whole team gets the same version.
React Router introduces breaking behaviour behind future flags before each major release. Turning them on one at a time in your current version lets you fix issues in small steps. When all flags are on and your app works, the major upgrade is mostly a version bump plus the import changes. The docs bundled in the package include a dedicated upgrading section for v7 projects.
Checking that your environment is ready for v8? See React Router system requirements and compatibility. Installing fresh? Follow How to Download and Install React Router.
Get React Router 8.5.3: one npm command, or the verified package download.
DownloadRelated articles
Every way to get React Router running: one npm command, a new Framework Mode app, or an offline install from the downloaded package, with checks at each step.
Read MoreBuild a small multi-page React app from scratch and learn Routes, Link, NavLink, Outlet, useParams and useNavigate along the way.
Read MoreA plain-English tour of what React Router can do, from nested layouts and URL params to loaders, actions, type-safe routes and server rendering.
Read More