Cordova vs React Native

What is Cordova?

Cordova is a mobile application development framework first introduced in 2009. The principe on which this framework builds its apps spawned the phrase "hybrid apps". Hybrid apps are essentially websites embedded in a mobile app through a WebView component (native browser).

What is React Native?

React Native is a framework created by Facebook in 2013. The development is done completely in JavaScript. Using a JavaScript interpreter it renders native components.

Development differences between Cordova and React Native

Cordova apps are written as single page applications, using common web technologies HTML, CSS for styles and JavaScript for logic (which include frameworks based on JS like Angular or JS libraries as jQuery). During, or after development is done, the JS application is embedded inside the integrated mobile web browser, called WebView. Cordova doesn't have access to any native controls out of the box, so because of that it lacks “native” feel, but that can be patched with a great number of available plugins. The main characteristic for Cordova is “Write once, run anywhere” meaning once the code is written it will run regrades of the platform. Debugging is easily done in Chrome’s developer console as the browser connects to the app, or from a device, but in that case the device must be constantly connected to a developer computer while testing is done.

React Native apps are written in JavaScript, using HTML-like elements called JSX to form the UI elements, which in turns are rendered as native UI components. That means, when writing a React Native component it will be rendered as a native input for each platform. For styling, React Native uses CSS lookalike code, but also written in JavaScript. The main principle of React Native is “Learn once, write anywhere”, prompting developers to use the components which best follow the native behaviours of the platform. In react Native UI debugging is done in the app itself (apps are wrapped together with debugging features) and for debugging JS in the Chrome’s developer console for example. There are a lot of plugins available for React Native and new versions are released monthly.

Boris Žmaher

back to top