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

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.

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.
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.
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

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 ;-)

Related

Best approach to upgrade react native dependencies

Recently, I joined a new company and found there are lots of outdated project dependencies e.g react-navigation#2.x.x, react-native-firebase, react-native etc. Now I want to upgrade all of them. Now another concern is rest of four developers are doing there on outdated packages.
So what would be the best approaches
Thanks in advance
I recently experienced the same thing. And here's how i dealt with:
You must talk to those devs and get approval for upgrade. Then you must select a day with no development to upgrade because every new commit will introduce conflict, weekend would be best.
Backup the project to multiple places, if you make something terrible, even remote git repo might not help you.
Upgrade react native first. Recent versions of libraries depends on the new technologies of react native. For example reanimated 2 requires rn > 0.62.
You can use React Native Upgrade Helper to see what has changed. If your project doesn't use too much custom native code you can even create a new empty react native project and copy necessary files.
Test your app in android & ios to see upgrading react native didn't break anything.
Then look into every dependency to see what has changed. You're in luck if you can find a migration guide (something like this: https://reactnavigation.org/docs/5.x/upgrading-from-4.x).
Some libraries like react navigation, react native reanimated changed drastically. These kind of libraries would be the most of your work, especially reanimated. Test and backup project after every library.
And you should be done. Test your project again for every screen / every method.
If you're 100% sure project is running as expected, you can change / create new tests and merge your changes.

What is the deciding factor for react dev tools to say that a particular react version used in a website is outdated?

React Developer Tools shows a message that i'm using an outdated version of react. I'm using 0.14.2 which is very old. But updating react to the latest version will break a lot of code. I want to upgrade react to the version that is not considered outdated as of now, and consider upgrading to latest some time later.
I feel 15.6.2 is the best i can upgrade to with out code changes. But how do i know if that version is also outdated according to React Developer Tools?
With the current plugin version, they check for various conditions. As of today anything 15 and earlier (less than 16) is considered to be "outdated" by the plugin.
To look at the specific details here is the code (line number 111).
// Seems like we're using the production version.
// However, the branch above is Stack-only so this is 15 or earlier.
return 'outdated';
React 16 was a major rewrite under the hood with changes related to the core architecture known as React-Fibre, which contains performance enhancements. It also is the first version to be released with the MIT license, hence recommended.

Ionic Framework and AngularJS

Let me preface these questions with the statement, "I'm not a web developer." Most of my work has been done in Python for data analytics.
Cutting right to it, I'm in a scenario where I'm learning web technologies such as HTML/CSS, JS, Ionic, and AngularJS in order to debug a pretty horrendous mobile app written by previous developers.
The app was built in the Ionic framework using Cordova plugins and AngularJS (yes, not the new Angular 6-7).
My questions are:
I have the newest version of Ionic installed on my computer that supports Angular 6-7. Will I have to roll it back to a previous version for it to support AngularJS?
Can my app encounter some serious problems in the next year (or less) if it is not rewritten using the new Angular?
1) You should not need to downgrade your version of Ionic, but will need to install the #ionic/v1-toolkit package.
2) This is more a subjective question. It is my understanding that v1 will remain stable for at least the near future. However, it is unlikely to have any more active development. You might encounter the usual issues with an older ecosystem, e.g. deprecated dependancies, out of date architecture patterns, lack of learning resources.
I have upgraded a few apps from v1 to v3/v4 at this point, and I VASTLY prefer the modern angular style, architecture, and functionality. So there is that. Typescript is very useful as well. The app will eventually need to be upgraded, and the upgrade from 1 to 2 is a total rewrite as Maheshivirus states. The more work you do on the Ionic 1 app, the more difficult the upgrade will be. Being ignorant of your circumstances, it might be worth considering upgrading first to limit development of technical debt and to better future proof your app.
The good news is they use the same cordova, so native functionality is very unlikely to be affected. Newer version of Ionic are faster, support lazy loading, have better components aesthetically, and work better as PWAs. If any of those aspects are of interest to you, that could sway your decision. See this link and this one for a bit more info. Second link indicates that no active work is being done on version 1 anymore.
Hope this helps.
- If you want to run Ionic 1 app then you should downgrade your installed ionic version to ionic 1.
-Ionic has updating day by day its better to update your ionic 1 projects to ionic 2+ because Ionic 2 is completely different from Ionic 1,as the language for framework has changed.Its no more angular 1,it's angular 2+ , TYPESCRIPT.
-At a high level, Ionic 2+ is a complete rewrite of the Ionic 1 project with Angular >= 2.x.

Upgrading Angular 2.0.0 to 2.x.x

Currently our application is on the Angular 2.0 version.
How important is it to keep updating it as and when Angular releases a new update?
In the changelog i dont see any breaking changes that need to be addressed immediately going from 2.0.0 to 2.4.2.
So is it necessary to upgrade our application from 2.0.0 to 2.4.2? Or should we just wait till there is another big release?
I would suggest upgrading to newer version of major release when:
You came across the issue/bug which was fixed in newer version.
There's a new feature which will come in handy.
Changes positively affecting performance - e.g. AOT compiler which can be a deal breaker to some people, but it might require some code to be rewritten to make it AOT-friendly.
Angular uses semantic versioning. Going from 2.0.x to 2.0.y means that a bug has been fixed. It's usually a good idea to avoid having bugs. Going from 2.0.y to 2.1.0 means that a new feature is available. You might want or need to benefit from this new feature.
You won't have any breaking change until the next major version, which will be 4.0.0 (there won't be a 3.x version, in order to align angular and its router versions)
As mentioned on this link under Best Practices Section
Best practices
Keep current with the latest Angular library releases. We regularly update our Angular libraries, and these updates may fix security
defects discovered in previous versions. Check the Angular change log
for security-related updates.
Don't modify your copy of Angular. Private, customized versions of Angular tend to fall behind the current version and may not include
important security fixes and enhancements. Instead, share your
Angular improvements with the community and make a pull request.
Avoid Angular APIs marked in the documentation as “Security Risk.”

Should I upgrade my project from Cake 1.2.5 to CakePHP 1.3.0?

My web project (to be launched in a few months) is currently using CakePHP 1.2.5 / PHP 5.1.6 / MySQL 5.0.77.
From a performance point of view, is it a good idea to upgrade to 1.3?
Will it make it easier to later upgrade to the (PHP5-only) CakePHP 2?
I'd say it depends on when you expect to get your site out the door. 1.3 is currently in alpha status and probably won't be officially stable for a while. While the changes being made between 1.2 and 1.3 shouldn't have a huge impact on the overall stability, the new features being put in might still be buggy. The question is, is there anything in 1.3 that you absolutely need now?
If you want to release your site soon on an unstable version of 1.3, you need to make sure through a lot of testing that the parts you're using are performing as expected. If your project will evolve over time together with 1.3, let's say over the next 6 months or so, and you continuously keep updating, you'll probably be in better shape. For example, I developed a project on the 1.2 beta and there were a few bugs in Set, which tripped me up, but got ironed out 'till the final release.
For a long-term project, I'd prefer the 1.3 branch, while for a near-future release I'd stick with 1.2.5 for now. You can keep an eye on the Migration Guide to avoid API calls that will be deprecated in 1.3, to allow for an easier later upgrade.
I think an upgrade is always a better opition IF you have time to do it. Im not into CataPHP but, i would do any upgraded if i have enough time before the release.
i'd upgrade early situation allows. if you haven't you might want to start using the cakephp/simpletest test to make sure things work just fine.
i took my time upgrading from 1.1 to 1.2 and had a lot of 'fun' going through my codes. :)

Resources