No description, website, or topics provided.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Official ReasonReact Migration Script

ReasonReact breaking change releases, if any, are accompanied by this upgrade script and a description of changes here.


Don't forget to upgrade your reason-react dependency first!

Pick the right version of the migration script based on the version of ReasonReact your app is using:

  • Upgrading from reason-react 0.3.0 to 0.3.1: npm install\#0.3.0-to-0.3.1
  • Upgrading from reason-react 0.3.1 to 0.4.0: npm install\#0.3.1-to-0.4.0
  • Upgrading from reason-react 0.4.2 to 0.5.0: npm install\#0.4.2-to-0.5.0

and so on. See the releases page for all the scripts.


  • If you're e.g. currently on reason-react 0.3.2, you can still use the #0.3.1-to-0.4.0 script, as there has been no breaking changes in-between reason-react 0.3.1 and 0.4.0.
  • You can chain the upgrade scripts one after another to upgrade a really old ReasonReact app onto the newest one; but you can't do it automatically. Some scripts might require some human clean-ups after being run.



Where is the file you want to upgrade. You can also pass a glob, e.g. src/*.re, to upgrade multiple files at once.

npm uninstall upgrade-reason-react after you're done.


If you're interested in contributing to this library, clone this repo and do yarn && yarn start to start the watcher.

For seeing a Reason file's AST, do ocamlc -pp "refmt --print binary" -dparsetree -impl test/ (assuming you have ocamlc and refmt somewhere).

Make the desired changes in src/, then run ./lib/bs/bytecode/migrate.byte test/ to test the modification of by your migrate script.