When we first heard about React Native, a framework that enables mobile app development for multiple platforms, we were thrilled. One team, one codebase and the potential to scale an app for iOS and Android using a fracture of resources required in native development is a great promise. But how does it stack up against the reality?
Netguru builds digital products that let people do things differently. Share your challenge with our team and we'll work with you to deliver a revolutionary digital product. Create a product with Netguru.
Over two years ago we decided to take a bet and invest in React Native while it was still pretty unstable. Right now, there are three teams with fourteen members altogether, and we are convinced that RN is here to stay. We have also run two editions of RN academy to share our knowledge and encourage others to try RN development. We want to share our insights and experience in the form of a blogpost as well. This is our refreshed, up-to-date look on React Native.
Until a few years ago, separate iOS and Android app development was a necessity if we aimed at both markets. Having two different teams – one for each system – generates more costs, especially when we think about continuous upgrades and regular introduction of new features.
A few years ago, Facebook officially announced React Native, a powerful framework with the promise of cross-platform compatibility. RN has matured since its launch, and we’ve had a chance to test it in the battle. We have built many apps for both commercial and internal projects, and now we can weigh up the pros and cons of React Native. Is it really worth your attention?
The major selling point of React Native is the shorter development time. The framework provides numerous ready-to-apply components that can accelerate the process.
As the RN community is growing and Facebook regularly introduces new updates, we may find ready components for most of the solutions we need one day.
We built the very same app with both React Native and Swift. The latter took as much as 33% more time to build and still was working only on iOS – with no Android version. Significant savings can come with developing for more than one platform. As RN lets you share a big part of a codebase between operating systems within a few hours, you can potentially save time and money.
React Native allows you to reuse the codebase (or just a part of it) between iOS and Android. In practice, full cross-platform development is possible to some extent, depending on how many native modules you use in your application.
Some features will be available in npm packages, but others will need to be written from scratch. It will only get better, though. React Native community actively supports the framework, adding new tools to its open source.
Whereas the stability of such solutions still leaves a lot to be desired, the possibility of sharing non-UI dependent code might still bring reasonable benefits. Besides shortening the development time, it could help improve the consistency of your app’s business logic between all supported platforms.
The React Native team seems to be listening to the community’s voice carefully. One of the top React Native pain points was that the Hot Reload feature was broken. Most developers had it turned off as it was unreliable. The response to these complaints is Fast Refresh. This tool, released at the end of 2019, fixes all the issues that Hot Reloading has and provides a great developer experience that speeds up both building new features and bug fixing.
Native development requires two separate teams for Android and iOS. It can hamper the communication between developers and, accordingly, slow down the development. Native Android and iOS teams have their own projects, and they often have different development speeds and methods. As a consequence, two projects can easily become inconsistent. It can lead to differences in the app’s implemented features, behaviour and appearance.
We ran a test and compared two versions of a simple application, written in React Native and Swift. Both apps achieved very similar performance results. Differences in performance were slight, almost unnoticeable to an average user. In the case of more complex applications, the framework might be less efficient, but you can always transfer some code to a native module, and it won’t be an issue anymore.
React Native is solidly based on creating a mobile UI. In native development, you will need to create a sequence of actions in the application. RN employs declarative programming in which such an order of implementing actions is obsolete. As a result, it is much easier to spot bugs on the paths a user can take.
While it may come as a surprise – after all, React Native is used by top tech players – it’s still in beta. Your developers might come across various issues with package compatibility or debugging tools. If your developers aren’t proficient in React Native, this might negatively impact your development as they spend time on troubleshooting.
Despite its maturity, React Native still lacks some components. Others, in turn, are underdeveloped. The chances are you won’t have a problem with that, as the majority of custom modules you need are available, well-documented, and working properly.
However, it might happen that you will have to build your solution from scratch or try to hack an existing one. When developing your custom modules, you could end up with three codebases (RN, Android, and iOS) for a component instead of only one. In each of those codebases, there can be differences in behaviour and appearance. Fortunately, those situations don’t come about often.
We had problems with making shadows work in our React Native application, as the custom library was only available in a beta version. Therefore, we decided to write our own custom solution to make it look the same as it was in the native application.
Implementing some native features and modules necessitates having detailed knowledge of a particular platform. The lack of out-of-the-box support for many native app functionalities (e.g. push notifications) used to be a significant issue with React Native development.
As the community grows, more and more open-source libraries provide easy access to native platform features. Nevertheless, the implementation of some more advanced features might still require help from iOS and Android developers.
Their input depends on the complexity of your project, but you need to bargain for them when kicking off with React Native. This might be an issue for small teams, in which developers don’t have any native mobile experience.
The most obvious alternative to React Native is the separate development for native iOS and Android platforms. As mentioned before, this involves having two teams developing two different apps. This might result in the apps becoming inconsistent, and you won’t be able to reuse code.
If you want your app to really “feel native” or aim at achieving maximum possible performance, native apps are probably still the best way to go. Better documentation and the wider availability of off-the-shelf solutions to popular problems are some other advantages. Be aware of the cost and time implications though.
Currently, the most popular cross-platform alternative to React Native is Flutter, a relatively new mobile application framework developed by Google.
It is based on the Dart programming language and takes a different approach to implementing cross-platform features. At Netguru, we like to keep an eye on emerging technologies, so we did some research on Flutter.
We found out that it can provide excellent performance and a native look to the apps developed with the help of the framework. As Flutter is quite new, the community is much smaller than when it comes to RN. Also, bear in mind that it is easier for frontend developers to switch to React Native (especially those with some React experience) than to learn a completely new language and framework. Dart might be easier for Java or C# developers, though.
There are many other alternatives for cross-platform mobile development. NativeScript is a framework that allows developing mobile apps using web frameworks like Angular or Vue.js. Xamarin uses the C# language and, like RN, it compiles the code to native controls.
Ionic is based on rendering app inside a WebView, which can be slower than other approaches. An interesting alternative for a simple application might be developing a Progressive Web App, a special type of website adapted for mobile and offline use.
React Native has been adopted by many, with better or worse results. The overall feedback is positive, and most see RN as a great opportunity and are sticking with it.
Discord is very happy with using React Native for iOS. Interestingly, they decided to keep the Android app native. They claim RN allows them to keep the team small and efficient. As for the biggest pain points, they mention some performance problems, e.g. dealing with very long lists, and the fact that they still require some native platform knowledge at times.
At the beginning of 2020 Shopify, a multinational e-commerce company, published a blog post with a meaningful title: React Native is the Future of Mobile at Shopify. That’s great news for Facebook’s framework, as Shopify can make a great contribution to open-source solutions.
Microsoft is probably one of the most impactful players in the React Native community. They collaborate with Facebook and are investing more and more in React Native. Thanks to their efforts, React Native supports Windows and macOS applications.
One of the biggest companies that invested in the technology, namely Airbnb, decided to sunset React Native. The decision was motivated by multiple technical and organizational issues, mostly due to the huge scale of the projects and the necessity of including RN in the already existing native apps.
UberEATS shared a very detailed report on their migration process to React Native. Possibilities of code reuse surpassed their initial expectations, and the overall experience is described as very positive.
At Artsy, the move to RN completely changed the development culture and structure, as they no longer have a dedicated iOS dev team. They point out that to succeed with RN, some native experience is necessary, but you don’t need to hire a dedicated team of native experts.
The above advantages and disadvantages are worth considering before kicking off with React Native, the most popular cross-platform mobile development framework.
The RN advantages include faster development in smaller teams, the possibility of reusing the codebase across multiple platforms, and the availability of some convenient tools for developers (such as fast refresh).
Be aware that the framework still has some issues, but they are mostly related to the immaturity of the technology and are likely to become less cumbersome in the future.
While working on bigger or more complex projects, you have to keep in mind that some help from native Android and iOS developers might still be necessary.
Overall, we see the future of React Native in bright colors – it is still under very active development, and the community keeps on growing. To get a full picture of the framework, check out our ultimate FAQ list or contact our team directly.