As of 2019 there are various mobile app development frameworks available. In this article we will compare React Native the latest and most promising cross platform framework for mobile app development with Apache’s Cordova which allows developers to make hybrid app using single code base.
Cordova is an open source platform for making cross platform hybrid apps. It is an open source project and maintained by Apache.
There are various frameworks developed on top of Cordova.js which includes Onsen UI, Framework 7 and very popular Ionic framework.
React Native vs Cordova
Here are some key points on where and why to use React Native/Cordova.
|UI development is a bit more difficult to understand in the beginning. Once your understand basic UI components, its much easier to work because they work on relative scale. What you design on one view will always look like that on other screens as well.||UI development is easy because you’re working with basic HTML/CSS. But it gets difficult to maintain font size with responsive design. You have to handle responsiveness of design for each screen size manually or by using Bootstrap.css or some other framework.|
|React Native development cycle is faster as compared to Hybrid apps because you’re writing code which gets compiled to native code on run time and with live reloading or hot reloading your changes are shown on device instantly.||Development cycle can be tricky. Each time you do a change you have to build your whole app again to check the changes.|
|Native APIs are much easier to work with. Because you don’t have to build your app again and again.|
For example: If you’re working with Location API. You call the APIs and it shows your changes instantly.
|Native APIs are difficult to work with. If you change a single line of code, you’ll have to rebuild your whole app to see your change|
|You can have a console for debugging using the web browser of your computer.||You can use developer console for debugging but you cannot debug native APIs that easily|
|React native developers are difficult to find and can cost you a lot more||Hybrid app developers are much easier to find because they are basically just web app developers.|
|Performance is good since you’re writing native code.||Performance is good if you’re working on small apps. More app screens can result in bad performance even on newer devices.|
|Can compile to iOS and Android both easily with minimal code change.||Sometimes need extra code change to work on iOS.|
|Good component and community support.||Good component and community support. Anything on web will work in it. jQuery, Bootstrap, etc.|
|Less stable, can break easily when you update your packages.||Highly stable.|
If you’re working on a small app which doesnt have a lot of screens. You’re good to go with Cordova.js using Ionic, Onsen or any other framework. This will not cost you a lot either.
If you’re working on a big app with a lot of screens, animations etc. You should choose React Native. This can cost you more than a hybrid app but your performance will be the best.