Wednesday, December 11, 2019

Flutter or React Native: Which One to Choose?

Introduction

Businesses in the mobile app development industry face this challenge at some point--of having to choose a versatile cross platform app development tool. The market is so huge and lucrative that it would be naive to ignore it and stick to just one OS or develop separately for each OS.

Currently there are two options available: React Native and Flutter. Both are open source.

Adopting a technology involves a significant investment of time and effort. What would be a worthwhile choice between these two in the long run, in a volatile market that sees changes almost every day? Let’s find out.

The following sections list the main criteria for choosing a cross-platform app development environment and then compare how React Native and Flutter perform against each of these criteria.

Ease of learning

As the programming language, React Native uses Javascript and Flutter uses Dart.  Dart follows most OOP concepts. So developers in modern OOP languages can start using Dart in a matter of hours. Even experienced developers find Flutter easier to learn than Javascript.The creators of Dart specifically wanted to remove the limitations of JavaScript, so it is no wonder if Dart delivers a better experience through Flutter.

Framework: Javascript vs Dart

React Native interacts with native modules using the Javascript bridge. The resulting performance is not satisfactory.

Flutter’s Dart framework has almost all of the components built in. It does not require a bridge to communicate with the modules. This naturally improves its performance.

The null reference-a Billion dollar problem

The null reference can cause costly mistakes. Flutter solves this problem by eliminating the null reference in the Dart language system which it uses. This is a significant advantage over React Native.

User base

It’s true that Flutter does not have as large a user base as React Native. But now its users are  rapidly growing in number.

In Github, React Native which started in 2015 has 83000 stars and Flutter has 80400. But  React Native started two years earlier. Flutter started only in 2017. Flutter is certain to capture the lead in the coming months or even weeks.

Documentation and support

Good documentation is critical in making a software popular among users. In this respect Flutter is definitely a step ahead of React Native. Google’s own documentation team is behind it and it also has a dedicated YouTube channel with many training videos for Flutter users.

Most of Flutter’s documentation is updated. They are also offering other channels of systems such as Discord, the gamers’ chat and support system. Discord has a Flutter Channel.

In comparison, React Native is left behind in the quality and completeness of documentation.

Compiled rendering components

All of Flutter’s rendering native components are already compiled; React Native needs another library to translate its Javascript code. This creates delay and other problems.

Speed of development

React Native releases a new bug-fixed version only once in a four week period. If your product development team needs a faster release, it simply is not possible.

Ease of Installation

Both React Native and Flutter lack in simplified installation methods. React Native has a slight advantage in that it uses the Homebrew package amanager for installation, while Flutter has a more lengthy procedure.

Setup and configuration

The process of setting up and configuration needs thorough documentation so that users can start working on the projects imediately. React Native does not offer sufficient explanation and instructions for setting up the tools for iOS and Android projects.

React Native is not easy to set up and start production, this is especially so if you already have a codebase. A significant investment of time and effort is needed to integrate it into your existing code.  And you cannot do away with writing native code completely either.

Flutter provides complete instructions on setting up the IDE and platform for mobile apps development (iOS and Android). Flutter also has a facility for offering guidance during the setting up process. It is called Flutter doctor. It identifies the tools that need configuration based on the local machine.

Feature
React Native
Flutter
Programming language
Javascript
Dart
Learning Curve
Steep
Easier
Creator
Facebook
Google
Main Architecture
Flux, Redux
BLoC
Ecosystem
Mature, many companies use it, many packages available
Not yet mature, fewer number of packages
Hot Reload
Supported
Supported
GitHub Stars
83200 (in 4 years)
80460 (in 2 years)
First release
Jan 2015
May 2017

The Conclusion

Flutter has the backing of Google which has had a successful history of launching products that went on to become trail blazers: Google search, Gmail, Maps, Android platform, Youtube, blogger, docs,. ..Google seems to have the proverbial Midas touch. Add to that their never ending quest for improvisation and innovation. And you have a winner.

The main argument raised against Flutter is that it is new and has a smaller community and support base. Flutter may be new, but Google is not. Google is investing significant efforts into developing Flutter’s support base.

React Native is ideal for simple applications where the APIs already have a bridge between the two platforms. However, as your applications develop, this becomes more and more difficult, as happened in the case of Airbnb.

The writing on the wall is clear: The verdict is in favor of Flutter. That companies like Airbnb are switching to Flutter from React Native, demonstrates this.