Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update project to latest React Native version? #1050

Closed
rxb opened this issue Apr 28, 2015 · 5 comments
Closed

How to update project to latest React Native version? #1050

rxb opened this issue Apr 28, 2015 · 5 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@rxb
Copy link
Contributor

rxb commented Apr 28, 2015

I haven't been able to figure out how to update my project to the latest version of React Native.
Is there an official way to update? Apologies if this is a newb question. Thanks!

@finalquest
Copy link

I think that if you used react-native-cli command to create your project, you just need to change the version in the react dependency inside package.json and the run npm update

@rxb
Copy link
Contributor Author

rxb commented Apr 28, 2015

Thank you, that was the ticket.

@rxb rxb closed this as completed Apr 28, 2015
@hiteshsahu
Copy link

This is an old question; on December 5, 2016, facebook have introduced react-native-git-upgrade for easier upgrade of react native.

Usage
Requirement: Git has to be available in the PATH. Your project doesn't have to be managed by Git.
Install react-native-git-upgrade globally:

$ npm install -g react-native-git-upgrade

or, using Yarn:

$ yarn global add react-native-git-upgrade

Then, run it inside your project directory:

$ cd MyProject
$ react-native-git-upgrade 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.

See documentation: https://facebook.github.io/react-native/blog/2016/12/05/easier-upgrades.html

@varunchandran333
Copy link

old version has index.android.js and index.ios.js
How could we add App.js and index.js and make it run successfully???

@igMartin
Copy link

@varunchandran333 here's a way #14246

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants