Packages

react-router

8.5.1 · 27 Oct 2026MIT80.5M / weekRepositorynpmAtom feed

Upgrading react-router From 4.4.0 to 5.0.0

1 release in betweenevery note read

Reading releases, release notes and advisories…

Other targets from 4.4.0Latest8.5.1
  1. 4.4.0yours
  2. 5.0.0target

Before you upgrade

Tick each one off as you go
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Deprecated5.0.0

Release by release

  1. 5.0.0

    Migration needed18 Mar 20193 new · 2 fixes
    • Breaking

      Since the old context API is no longer used, any access to the old context will fail. Use of the react router context is not supported, please use withRouter() or a <Route/> instead.

    • Breaking

      Due to the new context API, mixing of imports will now result in an exception:

    • Breaking

      In development mode, we now throw an error when using 2 different builds (see b2c6fa0), i.E. combining CJS imports with ESM imports.

    • Breaking

      Removed deprecated lifecycle methods componentWillMount and componentWillReceiveProps

11 other lines we could not sort, mostly version bumps
  • <Route /> now supports multiple child nodes when using react >= 16.0.

    5.0.0
  • Migrated to new react context API, with a polyfill for react versions < 16.2

    5.0.0
  • Smaller build size

    5.0.0
  • Package now includes pre-minified files

    5.0.0
  • Package now consists of single-file builds that include all modules.

    5.0.0
  • Upgraded to history 4.9.0

    5.0.0
  • Made sure that react router conforms to react <StrictMode/>

    5.0.0
  • Removed use of eval in development to be compliant with unsafe-eval CSP - #6611

    5.0.0
  • Migrated to babel-preset-env

    5.0.0
  • Improved testing infrastructure to improve developer workflow

    5.0.0

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.