Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why should/should not I upgrade to react-native 0.60.0?

Currently, react-native has released version 0.60.0 and it has breaking changes but they have added many native supports in this version.

I am currently working on my 3 projects.

First Project Info
- react: 16.0.0-beta.5 => 16.0.0-beta.5
- react-native: 0.49.0 => 0.49.0
this project containes lots of third party libraries and some of them not event maintained by owners.

Second Project Info
- react: 16.6.3 => 16.6.3
- react-native: 0.57.8 => 0.57.8
this project containes 12 third party libraries.

Third Project Info
- react: 16.8.5 => 16.8.5
- react-native: 0.59.2 => 0.59.2
this project containes 7 third party libraries.

Currently, all three projects are working in debug mode (Didn't try Release mode).
now I want to know from the above-mentioned project which one should I migrate to react-native 0.60.0 (Why)?
What if I don't migrate to react-native 0.60.0?
What are the challenges If I migrate to react-native 0.60.0?
Please guide me.
Suggestions are Welcome.

like image 878
Ronit kadwane Avatar asked Jan 01 '23 19:01

Ronit kadwane


2 Answers

Here is the specific version timeline that will benefit your app with the trade-off.

v0.59.x

  • Android 64bit, mandatory for play store publishing.
  • React hooks
  • new javascript core engine for android, make your app smoother.

v0.60.x

  • CocoaPods by default, easier to integrate 3rd party library especially native module!
  • AndroidX, this will break 3rd party library (even newer one and need time to update it).
  • Webview and Geolocation is removed.
  • Hermes javascript engine! Faster startup.

Suggestions

In my opinion, try upgrading to 0.59 is the safest sweet spot because without it, you can't publish your app on play store that requires your app 64 bit compatible. 0.60 can wait, as many of libraries (even newer one!) still not support 0.60.

  1. Obviously project with 0.49 is the hardest one to upgrade because sometimes you need to fork not-maintained-library and fix it by yourself.
  2. Project with 0.57 will be much easier to upgrade to 0.59 because the structure mainly not changes a lot. You can refer to https://github.com/react-native-community/rn-diff-purge
like image 93
I Putu Yoga Permana Avatar answered Jan 08 '23 03:01

I Putu Yoga Permana


I am not sure about react, but I've had to deal with a similar situation with android SDK, .net core, angular (JS), Xamarin, and Cordova, which I think allows me to make an educated guess, but, beware it a general approach.

So;

upgrading

pros

  • in line with new features, big fixes, security fixes etc
  • up to date with latest hardware
  • small migration blocks (assuming you kept up with the update pase)

cons

  • possible lose of hardware compatibility on older hardware
  • need time for proper testing the exact behaviour (test automatisation helps)

not upgrading

pros

  • saves time now
  • keep compatibility with older hardware (for now)
  • your current release is well tested, no surprises

cons

  • will take more time to migrate in the future
  • missing out on new features
  • missing out on stability, security improvements etc.

pre release specific

In your case, since you are dealing with a pre 1.0 version?; you are a typical early adapter. This means you understand the risks involved and are aware of the high update frequency. I would therefore advise to update, but test it well.

... as a general approach ;-)

like image 45
Stefan Avatar answered Jan 08 '23 03:01

Stefan