Why React Native got an Upper Hand Over Ionic

Mayank Badhani
6 min readFeb 22, 2021

--

React Native vs Ionic is the biggest point of debate when it comes to evaluation of cross-platform frameworks. In this article, we will evaluate React native vs ionic performance, user experience and much more. But first, let me introduce you to the cross-platform world.

React Native basics

React Native is a cross-platform solution to build mobile apps natively on both iOS and Android. It is coded in JavaScript using React. It was open-sourced back in 2015 by Facebook and has gained immense popularity ever since.

React Native is used to build native mobile apps using JavaScript and React on both iOS and Android.

Ionic basics

Ionic is a hybrid solution to build your mobile apps. It allows you to use standard web technologies like JavaScript, HTML, and CSS to build high-quality, cross-platform apps.

The idea is that you code once, and that code can be deployed cross-platform on iOS, Android, Web, and desktop. The same code-base is shared across all the platforms.

Functionality of React Native vs Ionic

Before we dive deep into details of our “React Native VS Ionic” and actually point out the differences between the two, let’s first understand how these frameworks work under the hood.

React Native uses three bridges, UI Thread, Layout Thread, and Javascript Virtual Machine, to trade information by sending messages to each of them. It uses JavaScript to map native capabilities. This helps developers to create mobile apps that are then converted into native code.

React Native is used to build truly native cross-platform apps. A native app is a software application built in a specific programming language, for the specific device platform, either iOS or Android.

On the other hand, the Ionic Framework uses web technologies (HTML, CSS, and JavaScript) to build the applications. It is possible to use Ionic Native and/or Capacitator to connect JavaScript and native abilities like accessing the user location, Bluetooth, camera, etc.

Ionic and React Native also have a different technology stack. With Ionic, developers are building one application on top of the browser, and have the ability to use all the npm packages available to React.js.

React Native has a more restricted stack since the code is translated to native code. Despite this, the React Native community is very large, with lots of ready to use libraries that help the mobile application development.

If your product is just a mobile app that needs to work across iOS and Android platforms and needs to look and feel like a native app, you should choose React Native.

UX/UI Performance Comparison

Cross-platform and hybrid frameworks just like any other framework quite often could face UX/UI performance issues. Here’s a video of Tal Kol speaking about some of these challenges in his Wix Engineering tech talk. Rendering your UI closer to 60fps is considered another big challenge while working with Ionic. Libraries like React Native Interactable and Lottie by Airbnb have significantly reduced the difficulties in reaching 60fps with React native though.

Commonly used inputs like hitSlop prop, components like KeyboardAvoidingView and TouchableNativeFeedback helps in providing more opportunities for configuring text inputs in order to enhance the user experience. Although Ionic has the ability to write a single codebase, it allows to create a simple hybrid application that is compatible with multiple platforms. It reduces the cost of developing and maintenance of separate codebases for separate native platforms. Thus, this provides you with more time to focus on developing features and improving the quality of application.

Performance

Ionic uses web technologies to render applications. Such an approach negatively affects the app’s speed and can cause performance issues when using multiple callbacks to native code. Besides, the development of advanced graphics or interactive transitions may be a complicated task. As a result, the performance of Ionic apps is lower when compared to native apps.

On the Other hand React Native gives a native-feeling, allowing you to modify platform-specific components. It is also an ideal platform when you need large-scale applications as the platform is stable. The enhanced performance and the responsiveness that comes with the platform need a higher budget.

React Native runs in the native code of the platform. This leads to a smoother experience for the user and fewer hiccups along the way. Basic device functions such as audio playback and the device camera are simple to access.

React Native renders code components directly to native APIs, ensuring high app performance, far better than Ionic

Simplified UI

React Native is firmly based on creating a mobile UI. This framework lets you create truly native apps that don’t compromise users’ experience. It provides a basic set of independent platform components, such as View, Text, and Image which are mapping directly to the platform’s native UI building blocks.

Developer community

React Native has strong community support and a variety of plugins available. The massive React Native community is always active and continuously helping each other. On the other hand, the Ionic community developers also solve any problems or issues but lack a huge number of plugins to obtain native features.

Ionic has 258+ version releases with 43.1k Github stars and 13.3k+ project forkings. Whereas, React Native has 352+ version releases with 20.5k+ projects that are forked constantly and their current stars are at a count of 93.5k in Github.

Application Data Security

The app developed with the Ionic framework may not provide as much security as a native application. For example, if you are developing a financial app, e.g., the app for a bank or other app which takes user’s data, the Ionic framework is not recommended.

React Native provides better securing possibilities.

Live hot reloading

The idea is to keep the app running and to see new versions of the files that you are editing ‘alive’. This way, you don’t lose any of your states, and this feature is especially useful if you are customizing the UI. Making a few changes in your app’s code immediately visible during development. If the business logic is changed, its reflection is live reloaded on screen.

ListView Scrolling comparison between React Native and Ionic

Ionic apps are essentially software that are embedded in a mobile wrapper known as WebView. There is therefore a substantial difference in performance between Ionic rendering via WebView and React Native compiling natively.

Take a very simple example of ListView to compare the output between React native and Ionic. In React Native, views are rendered natively as opposed to Ionic, where views are rendered in WebView (HTML/CSS and JavaScript).

The native rendering and efficiency of React Native is relatively better than Ionic.

Popularity

From this survey results of State of JavaScript survey of 2018, we can infer that React Native is definitely more popular as a mobile framework when compared to Ionic. React Native’s greater popularity is due to its ability to build truly “native” apps using JavaScript and React. The concept of a hybrid app using WebViews is good, but it does not come close to the look and feel of a native app. Ionic being a hybrid app lacks the looks and feel of a truly native app. Whereas, React Native apps are native and it is awesome that the components are all native to iOS and Android. The end-user will not be able to distinguish between a native app and a React Native app. This is the most important factor contributing to React Native’s popularity.

Apps built with React Native

Here are some major apps build with React Native:

  1. Airbnb

2. Facebook Ads Manager

3. Instagram

4. Uber Eats

5. Bloomberg

6. WallMart

7. Myntra

8. Discord

9. Tesla

10. Hike

According to Airbnb’s experience:

The primary benefit of React Native is the fact that the code you write runs natively on Android and iOS. Most features that used React Native were able to achieve 95–100% shared code, and 0.2% of files were platform-specific.

--

--