DEV Community

Discussion on: I've seen heaven. And it's written in JavaScript.

Collapse
 
bernhardwebstudio profile image
Bernhard Webstudio

Nice article, thank you for introducing me to react native. What would you name as arguments to use react native instead of Phonegap/Cordova?

Collapse
 
devtouser432 profile image
devtouser432

Not too familiar with either of those, but if I recall correctly, both of those are webview based wrappers, and not actual native code.

Collapse
 
stecman profile image
Stephen Holdaway • Edited

We had a project that was originally written using PhoneGap/Cordova + React, and later rebuilt using React Native when Android support first came out. From that experience, I'd highly recommend staying away from Cordova for any serious projects.

The biggest pain with Cordova for a sufficiently complex app is that you end up fighting the same browser support battles as regular web dev, except it's much harder to support all the WebViews because there are so many variants and versions in use with their own feature support limitations, rendering bugs and behaviour quirks. You end up with a whole lot of targeted CSS to get roughly the same appearance on a range of devices (that you have to keep going back to each time a new inconsistency is spotted on a popular device), and rewriting behaviours in different ways to work around quirks on specific devices (Samsung devices with their Samsung browser were notorious for touch, input and rendering issues in our experience).

On top of this, even with decent lag-free touch handling like React-Tappable offers, the app still looks like a website stuffed in an app; unless you're targeting one device, not having physical units means the app always looks different on different devices due to different DPI.

Interfacing anything native with Cordova was also a bit unstable in our experience, but that's nothing compared to the maintenance hell it led us to.

React Native worked consistently and performantly across devices of all types and versions for us.