I’m currently working on a React Native project and planning to upgrade from version 0.61.1 to the latest stable version in the 70 series. I would appreciate some guidance and recommendations regarding the upgrade process.
Here are my specific questions:
What is the recommended approach to upgrading React Native when there is a significant version gap? Should I upgrade step by step or can I directly jump to the latest version in the 70 series?
Which stable version in the 70 series would you suggest for upgrading from 0.61.0? Are there any known issues or considerations I should be aware of?
Upgrading Version
I’m looking to upgrade to 0.72.0.
Any tips, insights, or personal experiences related to this upgrade would be highly appreciated.
Thank you in advance!
Question posted in React native
The official React Native documentation can be found here.
The official React Native documentation can be found here.
2
Answers
you can use the Upgrade Helper tool.
1. Select the versions
You first need to select from and to which version you wish to upgrade, by default the latest major versions are selected. After selecting you can click the button "Show me how to upgrade".
2.Upgrade dependencies
The first file that is shown is the
package.json
, it’s good to update the dependencies that are showing in there.For example, if
react-native
andreact
appears as changes then you can install it in your project by running yarn add or npm install:{{VERSION}}
and{{REACT_VERSION}}
are the release versions showing in the difference there.3.Upgrade your project files
The new release may contain updates to other files that are generated when you run
npx react-native init
, those files are listed after thepackage.json
in the Upgrade Helper page.If there aren’t other changes then you only need to rebuild the project to continue developing.
In case there are changes then you can either update them manually by copying and pasting from the changes in the page or you can do it with the React Native CLI upgrade command by running:
You can use Upgrade Helper Tool to upgrade your React Native version
it is a web tool to help you upgrade your React Native by using source and target version of react native
⚙️ How to use
Note: Backup your project first before updating your app