Upgrade React Native Projects

ref: http://facebook.github.io/react-native/blog/2016/12/05/easier-upgrades.html

$ yarn global add reactnativegitupgrade

Then, run it inside your project directory:

$ cd MyProject $ reactnativegitupgrade 0.38.0

Note: Do not run ‘npm install’ to install a new version of react-native. The tool needs to be able to compare the old and new project template to work correctly. Simply run it inside your app folder as shown above, while still on the old version.

You can also run react-native-git-upgrade with no arguments to upgrade to the latest version of React Native.

Looking ahead

The logic behind react-native-git-upgrade described above is going to power the standard react-native upgrade starting with React Native version 0.40.0.

This means that if you are upgrading from version 0.40.0 or higher, you will be able to simply run react-native upgrade in your project without having to install anything globally. The react-native-git-upgrade is provided so anyone can enjoy this improved experience today while using older versions of React Native.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s