What is it
React Native provides the benefits from both Native and Hybrid Mobile Apps.
Sounds a bit unreal. However, React Native allows to accelerate the building mobile applications across different platforms, thanks to the possibility of reusing most of the code between them.
There were many other attempts to do something similar before, for example:
PhoneGap – implementation of native components on web technologies launched in WebView
NativeScript – similar ideas as in React Native based on XML, JS, CSS
Xamarin – from Mono developers for Linux, applications are written in C #, this is Microsoft’s project.
Mark Zuckerberg mentioned about idea to bet more on native instead of HTML in 2012 He promised to deliver a better Facebook mobile experience. Jordan Walke found a way to generate UI elements for iOS from a background JS thread. Then they organised an Facebook team Hackathon to work at prototype and find the solution for the ability to build native mobile applications with this technology.
React Native was developed in 2015 by Facebook team and since that time the interest in this framework was rapidly growing. Now thousands of apps are using React Native. Among them: Facebook, Tesla, UberEats, Walmart, Bloomberg.
Let’s try to review strong and weak sides of React Native.
Faster development process. Let’s bring your app from specification to release in a shorter time frame. React Native uses some tricks like Hot and Live Reloading feature enables developers to refresh your emulator instantly without recompilation. We can iterate quickly. That’s important.
Shared code-base between both iOS and Android. Major code-base can be shared across platforms. This reduces the complexity of developing two separate native apps and keeping them synced. Developer doesn’t need to switch between Xcode and Android Studio any more.
More than hybrid apps. Other hybrid frameworks like Cordova or Ionic limit you to the features developed by their technologies. Some even render your entire app in a WebView. This solution does not allow to use native user interface as well as some of a mobile device functionalities available via API. But RN provides the possibility to write native code at any point.
Separately, I can highlight the Node Package Manager (NPM). RN developer can use this the best dependency management and ecosystem. Developer doesn’t need to download all resources on every single launch, reduces the painful workspace regeneration and sharing issues with Cocoa Pods, as well as manages dependencies with nested resolution to avoid incorrect versioning.
Open Source, Facebook supported. RN is built by Facebook and it is open source software. This helps the developers to suggest changes to make the app more efficient. RN is free to use. Moreover, it allows developers (look here for an example of one) to fix bugs and even add their own features while they are designing the app.
Strong Community. React Native has one of the most active open source communities. Professional Android, iOS, Web developers bring new development concepts, suggest solutions of the most typical problems, reconsidered traditional architecture. Useful information, tricks and tips, issues solutions are available in a wide variety.
Performance still have to be considered. Using the aforesaid third-party libraries and bridges reduces a mobile app performance. In addition, smartphone memory and processor use native components, which also affects performance.
Longer debugging. React Native increases speed of development, but as well increases the duration of the debugging process.
Not really open-sourced. Yes, React Native is open-source software, but it is owned by Facebook, controlled by them. It is possible to become risky in case of some factors. Facebook can easily stop the development of React Native, can stop the support, and problems will begin. What is more dangerous – Facebook can refuse developers using their framework on their projects for some reasons. Here I can recall how it was painful when Facebook bought Instagram and closed access to it’s API for newer developers.
So, when it is worth
Consider these if you decide to develop in React Native
If you plan to build an app with RN and maintain it over a longer period of time, you need to prepare for more frequent updates than in native technologies (you need to update your app both when the platform has been updated and when new components have been added to React Native). This is not a disadvantage, as React Native is regularly updated and new useful components are created (monthly). But you have to remember about making more regular updates to your app. In the past developers struggled with the update process, but since version 0.59 you can make updates without any concern. Also share your plans with you mobile development partner to minimize potential risks – a mismatch between the technology and the development plans.
When is native mobile development better?
Note, that all of the recommendations below may become as less relevant as more new versions of RN are released…
Apps with complex user interfaces. JS allows to build fast and smooth apps. If your application’s user interface requires too much interactions, then React Native maybe not the best choice.
Apps that are designed for a single OS. The app will exclusively available on Android devices or exclusively available on iOS devices.
Media players, Utilities, complex features. Apps like antivirus software, battery monitors, media players almost always use native features and APIs provided by the underlying platform. So, such apps can be coded much more easily using native languages.
Complex features, for example:
• QR codes scanning
• OCR (Optical Character Recognition)
• AR (augmented reality) / VR (virtual reality)
• Voice assistants
When is React Native development better?
Short-term game. For example, for promotional campaigns. There is no complex features and the application will not live for long, so there is no need to worry about future scale and support.
Convert a website into an app. RN works on JS and websites use the same technology. That’s why, if you need to create a simple application that will show the data from your website, you can easily use React Native.
When planning simple standard features.
There are very clear advantages and disadvantages to going with React Native. Performance really does matter, as do developer costs and speed of development. The decision you make will depend on the exact details of your situation. The app your building, the amount of funding you have, and the skillset of your team and future team members.
A startup is often about iterating on ideas, and you don’t know what’s going to work and what isn’t. Developing mobile apps for startups for 3 platforms is important. But one should not later realize no one wants to use them which would be a real shame.
RN is a good choice not only for small companies, but also for large ones. Remember Tesla, Walmart, and Uber Eats?
Yes, they use RN only for part of their products, but this is maybe because they are almost sure that they will have huge revenue even if they spend much for separate teams of Android and iOS developers and so make their main products slightly better for millions of users.