This article will guide you through the process of upgrading your React native version from a lower version possibly less than 0.59 to 0.62
Tl;dr it’s a cumbersome process if you don’t follow correctly.
The major reasons for upgrading are
Well, the newer versions of React native ( >0.60) has a utility tool to upgrade easily. It uses git under the hood to upgrade your React native under the hood. But coming to older versions of react-native (<0.60) this support doesn’t work quite well. And in most cases, it requires you to manually upgrade.
So, to upgrade from 0.57.0 to 0.62.2 you need to first upgrade it to 0.58.6 and then 0.59.10 after this you’re okay to upgrade to 0.62 or higher. This is my personal experience. Because jumping directly to the latest version had many confusions and thus failures. So, I recommend to upgrade it in parts.
Here’s the actual upgrade process of React native from 0.57.0 to 0.62.2
yarn install or npm i
gradlew clean
yarn android
or android studio.That’s it. You now have the latest React Native version. You’ve successfully upgraded from 0.57.0 to 0.62.2 🎉
Let me know if you face any problems or if you have any better ways to do it.