Which one do you prefer in production?
Why?
At one point in the timeline, PhoneGap used to be the pinnacle of HTML-based mobile app development, now...you can say it's not. A platform I've used and loved is Ionic.
For starters, their tooling is amazing. It's based on Angular, so anything which works with Angular, works with Ionic. Essentially, I'd say that you compare Ionic to React Native; not PhoneGap.
I have been working on developing hybrid apps since last 2 years or so and while i am a huge fan of web technologies and i love creating UI's with css and html, the fact that always stands out is that the end product that you get with a hybrid app can't match to its native counterpart on Android at present.
On iOS i must say there is very less difference between both of them and i would fully recommend going for phonegap if you are purely developing for iOS.
I have been trying to improve hybrid app performances by using various optimizations but there are certain limitations of the environment (webview) due to which phonegap apps fall behind native apps. Hence there will be some noticeable difference in the app when compared to native.
The industry is growing and we are seeing platforms such as ionic which are trying to close the gap as much as possible but as far as i understand unless there are significant changes to the underlying platform that hybrid apps run on, it will always be lagging its native rival.
"- Slower and less performant" this is true at years ago. But, since the latest release of Crosswalk & Wkwebview, the visual performance of cordova based app ( I use Ionic) is much improved when I use these web views on the hybrid app.
React native and PhoneGap are two really different things when it comes to creating a JS based app.
React native is based on the bridge between the native platform and JS, that allows to render real native component instead of a webview. It creates then far more possibilities because we have access to a big part of the Android/IOS API through the bridge. It shortens the difference between native and JS based app. And there are some big benefices to using React Native:
Some disadvantages:
PhoneGap / Cordova is different since this is a HTML / CSS / JS app rendered in a webview. This way you can use any of the frameworks or JS based libraries to make your app. You can still access phone components via the navigator API.
Main benefits:
Disadvantages :
- Slower and less performant
I would say go for React-Native if you already know React, but if you haven't fooled around with it, you should consider PhoneGap as a good option.
I would bet that more Bridge based library will appear in the next months!
Hope it helps :)