react-router
8.5.1 · 27 Oct 2026MIT80.5M / weekRepositorynpmAtom feed
Upgrading react-router From 2.2.1 to 2.8.1
13 releases in betweenevery note read
Reading releases, release notes and advisories…
- 1
- change to make
- 0
- advisories fixed
- 8
- new
- 4
- fixes
Before you upgrade
Tick each one off as you go- Deprecated2.3.0
Release by release
- Fixed
Bugfix: Fix redirects that specify
query
- Fixed
- New
Feature: Support omitting
toon<Link>
- New
2.6.1nothing new or fixed in the note
- New
Feature: Add
prevStateas argument toonLeavehooks - Fixed
Bugfix: Fix when the
<Link>onClickinvariant runs
- New
2.5.0 – 2.5.23 releases, nothing new or fixed in the notes
- Fixed
Bugfix: Don't crash on invalid URI components in params
- Fixed
- New
Feature: Add
withRouterhigher-order component for injectingprops.router - New
Minor: Add React as a peer dependency
- New
Minor: Add
targettopropTypesfor<Link>
- New
11 other lines we could not sort, mostly version bumps
- 2.8.0
Refactor: Use
history.replaceinstead ofhistory.transitionTofor redirects - 2.7.0
Bugfix: Warn on invalid router middlewares
- 2.6.1
Bugfix: Correctly handle routes with patterns that are the names of properties on
Object.prototype - 2.5.2
Bugfix: Remove extraneous
propTypescheck when creating a route object from a React element - 2.5.1
Bugfix: Throw error instead of silently failing with history v3
- 2.5.1
Bugfix: Explicitly throw error in
onClickhandler of<Link>rendered outside of router context - 2.5.0
- 2.5.0
Refactor: Refactor creating
routeParamsobjects - 2.4.0
Minor: Upgrade to Babel 6
- 2.3.0
Minor: Move ES module build back to
es6/to avoid breaking people who were incorrectly importing fromreact-router/es6
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.