NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1611 most downloaded on npm
Declarative routing for React
Last release 12 days ago
15 Sep 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
13 years old
1186 releases · first in 2014
Added support for as a child of a
<Redirect> as a child of a <Switch><Switch> would always remount children<Route><Switch location> and <Route location> props so that "pure" route
components can know when the location changes<NativeRouter>packages directoriescontext.router into two parts: context.history and context.routematchPath signature to matchPath(pathname, options)Fixed a bug with 's createHref (#4484 thanks @pshrmn)
One column per quarter.
<StaticRouter>'s createHref (#4484 thanks @pshrmn)<Link to> in react-router-native (#4483 by @CodogoFreddie)react-router in react-router-dom's UMD bundleAdd ES build to react-router and react-router-dom (#4432 by @billyjanitsch)
<StaticRouter> locations<Router> is given >1 children (#4450 by @jackfranklin)Fix NavLink location variable (#4403 by @inuscript)
<NavLink strict> and <NavLink exact>Fix missing StaticRouter (#4389 by @supasate)
## Changes - No end-user changes
This is a pretty big change from the alpha versions, so the diff isn't super helpful.
This is a pretty big change from the alpha versions, so the diff isn't super helpful.
This release breaks things into a monorepo format, with several sub-packages for different ways of using the router. Think react-dom vs. react-native.
This release fixes problems with the last release for users of npm 2.x and yarn. If you're having trouble with alpha 5, this version should give you l
This release fixes problems with the last release for users of npm 2.x and yarn. If you're having trouble with alpha 5, this version should give you less trouble.
Skipping the changelog on this one, as @ryanflorence has a heavily refactored version coming in the next day or two. Please wait for that release before upgrading if you're not blocked by the previous release's packaging issues.
URL decode all parameters (@tyrsius in #3991)
PropTypes are now exported (@alisd23 in #3910)
I've swapped out the version string to better represent the prerelease nature of the v4 branch currently. It may not have been obvious before, but acc
I've swapped out the version string to better represent the prerelease nature of the v4 branch currently. It may not have been obvious before, but according to semver, any version string with a -anything on the end is considered a prerelease version. I've seen some references to the versions before as 4.0.1 and 4.0.2. This isn't correct, as we haven't yet pushed a 4.0.0 final version. This is not production-ready code. We're not done building 4.0!
And, most importantly, we need your help to figure out things that are missing, either stuff that should go into the core of React Router or external libraries and code patterns that need to be established. React Router is now a building block as much as React itself is, and this more lean, mean, super-minimal core means that you can build a lot of interesting stuff on top of it. Now's a great time to get into open source and contribute some code. Keep those issues and PRs coming!
Also, for the love of god, yes, we know the docs site isn't scrollable. We'll push a new version soon!
Use this link for the docs site from now on: https://react-router.now.sh/ We'll keep it updated.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Upgrade hoist-non-react-statics/react-is to support newer React APIs (#7182 by @henryqdineen)
Fix React version detection for UNSAFE_ lifecycles (fixes issues with React 16.10) (#6961 by @henryqdineen)
Add UNSAFE_ prefixes to deprecated lifecycle methods (#6883 by @bishwei)
This release includes the missing UMD build from the 3.2.2. Sorry about that!
This release includes the missing UMD build from the 3.2.2. Sorry about that!
React 16.6 support (#6806 by @arthur791004)
<Link>s underlying node via innerRef (#6340 by @pascalduez)## Changes - React 16.3 support
## Changes - React 16 support
Nothing published for this version
Nothing published for this version
Manually set displayName for components
Fixes for React 15.5 deprecation warnings
Fix webpack-related anonymous function issue (#4857 by @alisd23)
Re-add module entry to package.json
Pass transition hook's arguments correctly (#4123 by @arkist)
This release removes all the deprecation warnings from v2.x along with some bugfixes.
🎉 The 100th release of React Router! 🎉
This release removes all the deprecation warnings from v2.x along with some bugfixes.
While the focus of this project is shifting towards the component-based v4, this branch will be maintained indefinitely!
Bug fixes will continue to be accepted. We are not going to leave anyone hanging and want to assure you that v3 development will be alive and well.
Oct 24, 2016
Feature: Add Promise support to async route functions
npm install react-router@beta
Sep 16, 2016
Upstream changes from v2.7.0 through v2.8.1:
query (#3808)to on <Link> (#3803)history.replace instead of history.transitionTo for redirects (#3799)router as a prop on withRouter-wrapped components for overriding the router object from context (#3729)withRef option to withRouter that enables getWrappedInstance (#3735, #3740)Feature: Support function to prop in
Breaking: Remove all deprecated functionality as of v2.6.0 (#3603, #3646)
Breaking: Remove all deprecated functionality as of v2.3.0 (#3340, #3435)
May 19, 2016
Bugfix: Fix redirects that specify query
Feature: Support omitting to on
Feature: Support router as a prop on withRouter-wrapped components for overriding the router object from context
Bugfix: Correctly handle routes with patterns that are the names of properties on Object.prototype
Feature: Add prevState as argument to onLeave hooks
Bugfix: Remove extraneous propTypes check when creating a route object from a React element
Bugfix: Throw error instead of silently failing with history v3
Feature/Deprecation: Call getChildRoutes and getIndexRoute with partialNextState; deprecate accessing location directly in favor of partialNextState.l…
Bugfix: Don't crash on invalid URI components in params
Feature: Add withRouter higher-order component for injecting props.router
Feature/Deprecation: Add routerShape and locationShape as top-level exported prop types, and deprecate all the old prop types, including the ones that…
applyRouterMiddleware for extending router rendering (#3327)routerShape and locationShape as top-level exported prop types, and deprecate all the old prop types, including the ones that were previously incorrectly removed (#3349)es6/ to avoid breaking people who were incorrectly importing from react-router/es6 (#3334)Noop: Publish again to npm to work around missing tarball problem
Bugfix: Fix edge cases with continuing matches after pathless routes
Bugfix: Fix this in getComponent and getComponents
Feature/Deprecation: Call getComponent and getComponents with nextState; deprecate accessing location directly in favor of nextState.location there (#…
getComponent and getComponents with nextState; deprecate accessing location directly in favor of nextState.location there (#3298, Upgrade Guide)className on <Link> (#3288)es6/ to es/ (#3295)Bugfix: Remove unintentionally released code change
Feature: Add support for onChange hook on routes
Bugfix: Call transition hooks on child routes of parents whose params changed but the child's did not.
We have done our best to provide backwards compatibility with deprecated APIs. If you drop in v2.x into a v1.x application and it doesn't run, then th…
You might enjoy reading this issue: https://github.com/rackt/react-router/issues/2646
context. It is now a documented feature of React so developers using Router can implement their own opinions on how best to use context: Mixins, higher-order components, decorators, etc. React Router no longer has an opinion, but instead uses the lowest level feature of React. This project wants to be an incredibly useful routing library and doesn't want to get hung up on best-practice patterns for getting stuff from up top to down low.props and what goes on context.For a lot of apps this upgrade might look like API churn. Underneath the hood there are significant differences that make integrating with the rest of the React ecosystem more straightforward. Thanks for your continued patience and support as we all build this tool together. It's hard to imagine the top-level API changing much after this. But if it does, rest assured we are committed to ...
This has been a community project from the start, we need your help making the upgrade as smooth as possible for everybody!
We have done our best to provide backwards compatibility with deprecated APIs. If you drop in v2.x into a v1.x application and it doesn't run, then there is a bug. Please open an issue when you discover what the problem is so we can get a fix out.
The deprecation warnings should also lead you to the relevant part of this document. If one doesn't, please open a pull request with a fix. Also, if any part of this document could be improved, please let us know how. Confound it, our bias is often inescapable!
Using a tool called jscodeshift, we have made available some codemods for upgrading your code to the new APIs automatically: https://github.com/rackt/rackt-codemod
A codemod is much like Babel, but instead of converting your ES2015 code to ES5 compatible syntax, it does a limited set of transformations on function names, arguments, common patterns and more. One way to think of jscodeshift (the underlying tool) is "jQuery for code". These codemods aren't bulletproof, so be sure to test your code after you run them. But they can help with upgrading a large codebase to remove deprecation warnings you're now triggering.
match (#3054)This should be the final release candidate before 2.0.0 final. Please test this version!
Add back deprecated RoutingContext export #2851
Also do not create a hashHistory on the server.
hashHistory on the server.rc2 hit an NPM packaging bug. This is a repackaging with one fix included:
rc2 hit an NPM packaging bug. This is a repackaging with one fix included:
history correctly included.browserHistory on the serverDeprecated Route Component props.history
Read the fancy upgrade guide.
Lots of stuff! Here's the summary.
render prop to RouterbrowserHistory and hashHistorycreateMemoryHistorycontext.history with context.routerprops.historycontext.locationDon't worry about it. See v2.0.0-rc2 instead!
Don't worry about it. See v2.0.0-rc2 instead!
NPM will no longer yell at you about versioning and any previous deprecation warnings have been cleared in the 1.17.0 version. Sorry about the confusi…
You may now upgrade your history version to the latest release. NPM will no longer yell at you about versioning and any previous deprecation warnings have been cleared in the 1.17.0 version. Sorry about the confusion!
npm install --save history@1.17.0
Please ensure your project is running history v1.13.1 to avoid any deprecation warnings or unmet peerDependencies errors.
Please ensure your project is running history v1.13.1 to avoid any deprecation warnings or unmet peerDependencies errors.
npm install --save history@1.13.1
1.13.x to avoid console warnings.Your coding agent can read these notes before it upgrades. Set up the MCP server →