Skip to content

Instantly share code, notes, and snippets.

@anoopmaddasseri
Last active October 24, 2017 10:31
Show Gist options
  • Save anoopmaddasseri/46da3eeaa11d623f173a48e3fc65a5a5 to your computer and use it in GitHub Desktop.
Save anoopmaddasseri/46da3eeaa11d623f173a48e3fc65a5a5 to your computer and use it in GitHub Desktop.
React Native vs Ionic 2 framework: Side-by-Side Comparison
ELEMENT REACT NATIVE IONIC 2
Powered By Based on React backed on Facebook Based on Angular 2 backed by Google
The Language stack React Native is based on the Javascript framework React and, thus, uses Javascript code that resembles HTML but essentially isn’t—they call it. JSX( is a preprocessor step that adds XML syntax to JavaScript). With that, the display logic is blended in with the business logic. HTML5, SASS, Angularjs , Cordova & TypeScript( A strict syntactical superset of JavaScript ). Ionic is a framework based on Angularjs, a Javascript framework. It uses HTML templates for its views. It is in line with the Model-View-Controller pattern as views and logic are clearly separated.
Boot up time Boot up time is as fast as native apps Boot up time is as fast as native apps
Memory Usage When it comes to memory usage, Ionic framework uses more than react native apps. can feel a little clunky but this can be mitigated with good design practises. React native is a memory saver as it supports third-party plugins mean you won’t have to rely on a WebView for certain functions. For example, if you’re adding Google Maps functionality to your app, React Native lets you link the plugin with a native module, so you can link the map up with the device’s functions like zoom, rotate, and the compass, while using less memory and loading faster. If your app supports older operating systems (and older devices), this can help you keep the app running smoothly.
File Size React native create bridge between javascript and native component. The main framework size is bit large in size. But still that is acceptable for an app and actually we can still do compression to react native app using ProGuard. Ionic is a cordova based app that wrap current web app into a mobile application. It uses the android existing web view to render the app so the file size is quite small.
Write once, run everywhere The goal of RN is not to provide a way to write once and run everywhere. Rather, they want developers to use the components which best follow the native behaviors of the platform. A typical hybrid app will run the same code regardless of the platform, and that is what Hybrid is capable of doing. However, in order to feel more “native”, Ionic will adapt a few of its behaviors according to the platform.
Testing during development With React Native you see the result of your modifications as you make them. No need to recompile, rebuild, etc.; the result is instant in an emulator or a real device. Pretty amazing! You can instantly preview your app in your browser and mobile devices. It instantly refreshes as you make changes to your application.
Plugins and Community Lot of plugins are already available on NPM for React Native. There’s even a plugin to use PhoneGap/Cordova plugins, which means that you instantly inherit the hundreds of mature plugins from the other community. PhoneGap and Cordova have been around for a while so there is a high chance that a plugin already exists to expose the native feature you need in your webview. They also have a marketplace where developers sell and offer Ionic plugins.
Developer experience React Native renders native views, no Webview here. This means, all the browser compatibility issues go away. You can focus on more important things rather than wasting hours or days fixing bugs. Building a hybrid app means, you automatically inherit all the issues that the web has. All those pesky bugs which only appear in one browser, all those different styles working differently across different browsers, believe me, it’s hard, really hard.
User experience Since all views are Native, the performance will be much better, and you get the Native feel with super smooth animations, just how you want it to be. And since React Native is just a library bundled with your app A major problem with hybrid apps is performance. The web was originally built for web pages, not the complex apps we make today. On high-end phones, a hybrid app is probably going to run just fine, though not as smooth as you would want, but it’s OK. Things get worse with low-end phones, though, and there are tons of people with low-end phones.
Ability to easily create versions for other OS? React Native supports Android and iOS. Support for Windows Universal Platform is currently maintained as a separate plugin. Ionic 2 supports out of the box platforms like Android and iOS and Windows Universal. Additionally Ionic framework is being enhanced to support Progressive web apps, and Native Browser support.
Time to market The time to market for iOS or Android react native app might equal that of native. Yet, building apps for multiple platforms will require you to either prolong time to market or increase the number of developers involved. Ionic 2 solutions offer the fastest time to market thanks to the single codebase and minimum customization. These tools are even used for prototyping and proof of concept projects
Community support Ionic has good community support in stackoverflow and in it’s own forum as well. React native also has equal community support and more github stars.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment