Upgrading and Backwards Compatibility for React Router and other Rackt Repos

Ryan Florence
1 min readDec 8, 2015

--

Up to this point React Router has not been kind to developers trying to upgrade to new versions. Sorry :( We were just trying to figure out what the API should even look like.

Now that we’ve hit 1.0, we are dedicated to smooth upgrade paths :D

It looks like this:

  1. Breaking API will be release alongside existing API in a m̶i̶n̶o̶r̶ major version change with deprecation warnings in the console.
  2. Deprecated API will be completely removed in the next major version change, which will happen no sooner than 3 months from the previous major change.
  3. Codemods will be created at https://github.com/rackt/rackt-codemod to update your code with ease (when somebody has the time and incentive to create them, also: awesome).

What does this mean in practice? You can upgrade from 1.0 to 2.0 without having to touch your app code. You’ll then have at least 3 months to update your app code to run without warnings. When 3.0 ships, you will again be able to upgrade without touching your app code.

(History isn’t following this strategy yet, but will be after 2.0 ships shortly.)

Happy upgrading!

--

--

Ryan Florence

Making React accessible for developers and their users at https://reach.tech with OSS, Workshops and Online Courses. (Formerly at React Training)