8 reasons why you should develop your apps with React Native

Anyone who wants to develop an app for smartphones is confronted with many questions. And this is the central one: Should the app be developed first for Android devices or first for iPhones? Android‘s market share is higher than iOS’, but only if the app runs on both platforms will it potentially reach all users.

If development is now to be done for Android and iOS, the traditional approaches of Google and Apple require two development teams and separate code. Both teams specialize in different aspects of the app, as they use Java (or Kotlin) for Android and Swift for iOS, which are not only different programming languages, but also have their own APIs and tools. So it is obvious to develop the app cross-platform to minimize the effort.

But which framework should be chosen?

Freshly published in January: 260 pages of know-how about React Native by Erik Behrends. The book is immediately available in on-line and off-line bookshops as well as on oreilly.de. With React Native a solid open source project for the cross-platform development of native apps is available since 2015. Introduced by Facebook, it is now being further developed by a number of well-known companies and used for popular apps such as Airbnb, Skype, Tesla and Instagram (click here for the official showcase). This article lists eight reasons why the React Native framework is an attractive approach to app development.

1. one code base – not only for Android and iOS

Okay, this is of course required for a cross-platform framework. Apps that are programmed for Android and iOS with React Native can mostly use the same code and can be developed in parallel. If necessary – for example, because of the different UI guidelines of both platforms – specific code for Android and iOS can be implemented seamlessly. And because programming is done in JavaScript, parts of the business logic can be reused in web projects without specific code for the app.

2. attractive and solid through JavaScript and React

In React Native programming is done with JavaScript, which makes the framework relatively easy to access for web developers, among others, because they do not have to learn a new programming language. In addition, React Native benefits from the declarative programming model in React, which provides an elegant and productive approach to user interface creation. This advantage is one of the reasons for the growing popularity of React Native in recent years.

With more than 60,000 stars, React Native is in the top 15 of popular projects on github. And those who have already implemented web projects with React will be able to get into app development with React Native quickly and without much effort.

3. true native apps

React Native creates high-performance apps with native UI elements for Android and iOS. A button is displayed as a real button in the iOS app and in the Android version as expected. This is a major advantage over hybrid frameworks such as Cordova and Ionic, whose application code is executed in a web view. UI elements are merely emulated there with HTML and CSS, which can have a negative effect on the appearance of the app. React Native also enables smooth animations – a fact that ensures a good user experience in an app.

4. high productivity through fast response times

Until now, if you change the code of a native app, it has to be recompiled each time. So before you can test it on your smartphone, it takes at least a few seconds for an Android app, and in an iOS project it often takes much longer (not to mention the frequently reported crashes of XCode). Most programmers are certainly aware that this can have a negative effect on their productivity and can be a test of their composure. By contrast, when programming with React Native, any change to the code is almost instantly visible in the app, thanks to features such as Live Reload and Hot Reloading.

5. active environment with many extensions and tools

React Native is actively developed by many developers and several companies. There are many useful extensions and libraries available that implement, for example, UI components that are not directly provided by React Native. The Start-up Expo, which provides some useful open source tools for React Native, should be highlighted.

To name just one example: In combination with React Native, the Expo App allows you to develop native apps for the iPhone without the need for an Apple computer. In addition, developers can use basically any help library from the huge open source environment of JavaScript or Node.js.

6. other platforms besides Android and iOS

Above I already mentioned that parts of the JavaScript code can also be used for web projects. However, there are additional platforms for which apps can be developed with React Native. These include Apple TV and Microsoft’s Universal Windows Platform. The architecture and functionality of React and React Native even make it possible to implement applications in the promising field of virtual reality (see React VR). And the React Native Web project makes it possible to integrate app components into web applications, which Twitter, among others, makes use of.

7. native code can be embedded

React Native allows you to embed native code for Android and iOS, allowing you to reuse native components of other projects or libraries. On the other hand, it is possible to use React Native in app projects that were previously developed using the conventional approaches of Google or Apple. Thus, it is possible to implement new functionalities in these projects prototypically and cross-platform with React Native and thus continue the development in parallel for Android and iOS.

8. easy start with Expo Snack

The Expo Snack tool lets you develop prototypical apps directly in your browser! With this fantastic tool, apps can be demonstrated or certain functionalities can be tried out. In particular, nothing needs to be installed to gain first experiences with React Native. I recommend this interactive tutorial for React Native – create your first app there in five minutes. Getting started with app development couldn’t be easier!

React Native is probably the only framework for cross-platform development of native apps that offers such a wealth of features and functionality. However, there are limitations to the framework that need to be considered.

Some frameworks require native code

There may be situations where it is not possible to implement certain functionalities of an app with React Native. This could be a special control element for which there is no component in the framework (yet). Also, the APIs of React Native do not cover all device functions, so that for example certain sensor data cannot be queried. In these cases, native code can be embedded, but it also means that at least one team member should be familiar with the native aspects of app development.

This knowledge becomes even more relevant when deep-seated errors in the code of an app need to be investigated, when backward compatibility needs to be ensured in the future, and when the app is to be published in the app stores.

The framework has not yet reached a stable version

Almost three years since its introduction, React Native is still in active development with monthly releases of new versions. Occasionally, changes to the framework occur, causing APIs to change or even be removed. Nevertheless, React Native can already be used for app projects without great risks – many well-known companies already provide proof of this.