React Native: A differentiator

Aasheesh Dwivedi
CloudBoost
Published in
4 min readDec 20, 2017

--

React Native is an open source project started by Facebook. It allows developers to build cross-platform mobile apps using JavaScript and works very similarly to React (Facebook’s popular JavaScript library for building single page web applications).

Many established fortune 500 companies to new startups have started using REACT Native, few of them to mention are Facebook, Instagram, Airbnb, Skype, Uber, Bloomberg, etc…

What is being replaced?

Ionic, Cordova & Phone-gap are some of the technologies which were otherwise used before REACT Native entered the market. Ionic, a framework on top of Cordova(access the phone hardware functionality). In simple terms, Cordova whirls up your system browser to render you app, known as WebView to access mobile functionalities like camera, contacts, etc. The performance is slow compared to react native as the code is written in “HTML” for android activities and also typescript components make’s tasks slower compared to directly working with native API.

The reason behind REACT Native being better in performance is, it uses platform-specific extensions for processing of hardware functionalities. Platform-specific extensions help’s react native automatically picks the platform module and later wraps up and sends the code accordingly.

One of the biggest flaws of hybrid apps is their UX. And if users do not get good experience, their trying the app again, falls down. The code is written in HTML which is used in web and web was originally built for web pages, not for the complex apps. For developers, it’s difficult to develop the complete app as there are fewer plugins available which end up for a developer to develop their own. These frameworks provided mobile accessibility but had performance issues affecting the user experience.

Why REACT Native?

Cross Platform Compatibility

Majority of the React Native APIs are cross-platform, which means that your one component will work on both iOS and Android. You can develop complete, full-blown applications that look, run and feel native — without writing a single line of platform-specific code.

The Platform module can detect the OS the app is running on, which can then be used to define platform-specific implementations. Platform-specific file extensions let you define files for specific platforms. React automatically picks up the correct file depending on the OS the app is running on.

Shorter Development Cycles

React Native makes the process of developing mobile apps much faster. We’ve seen development times drop by around 30% using open source components.

Using Redux — the state management tool has also helped reduce development times drastically. Creating one shared data layer for both iOS and Android makes it faster, with lower chances of failure.

Live Updates and CodePush

Developing native mobile applications with React Native has one very big advantage — Live Updates. Developers can push the updates to the user’s phone without having to go through the app store update cycle. This has been made possible due to the extensive use of Javascript.

Longer approval times is more specific to iOS. But updating all your user’s apps on the fly ensures that you won’t have to deal with older version problems.

React Native Builds Near Native Apps

Mobile apps created using React Native perform’s, as well as any native app. While Javascript is not as fast as Native language (Swift or Java), React along with Javascript can run even the most complex of apps smoothly. The JS part of the code runs on its own thread, so your app’s UI animation won’t lag, no matter how heavy the compilations. Unless, of course, the processes overlap.

It also gives the developers an option to write code in native languages when required. It’s easy to switch to Swift of Java when fine-tuning a certain component.

Better Development Environment

Developers are having a better time developing in the React Native environment. Hot reloading refreshes the UI instantly when any changes are made to the file. Removing the tiresome re-build and deploy from the iteration cycle makes for a pleasant development experience.

React Native uses the Flexbox layout engine for both the platforms. This means you need to learn just one layout engine to develop for both iOS and Android.

Conclusion

While there is no doubt that React Native makes developing mobile apps a breeze, the apps so developed are also very high quality. A lot of development companies are switching to React Native providing rich ecosystem and vibrant, growing community also telltale signs that React Native will soon become a norm for mobile app development.

--

--