Flutter or React Native: That is the question?

Identify the best fit for your business needs

Nikhil Mahirrao
Globant
9 min readAug 7, 2020

--

Flutter or React Native

Are you planning to develop a mobile app, but finding it difficult to choose a framework that fits your business needs and budget?

In this article, we are going to discuss two leading cross-platform technologies, i.e Flutter and React Native, which will help you to identify the best fit for your app.

When it comes to cross-platform frameworks, the popularity trend of Flutter and React Native has increased exponentially. You can see below the trend comparison between both of them.

Google Trend
Stack Overflow Trends

1. Architecture:

Architecture

The technical architecture of the framework plays the most important role while choosing app development frameworks. It directly impacts the performance, development speed, availability of hooks to create an extension for solving custom tasks, and the most important thing for the product — Quality.

Flutter:

Flutter Architecture

Flutter uses Dart as a programming language, which has a low-level Skia C++ engine. It is also used in Android and Chrome browsers under the hood. The Dart framework has almost all components in-built called widgets and Skia has all the protocols, compositions, and channels because of this it does not require the bridge to communicate with the native systems and modules. Flutter provides platform channels to communicate with native systems and services like location, Bluetooth, audio, etc. Dart is also packed with Material and Cupertino which directly render on native canvas without the need of any bridge, due to which the app looks and behaves the same on different OS.

React Native:

React Native Architecture

React Native uses the Flux architecture from Facebook. It is the application architecture for building client-side web applications. React Native uses the Javascript bridge to communicate between JS code and native systems and services. It also compiles Javascript code into native code at runtime. React Native applications are more aligned with native apps as it uses native OS components. On the other side, due to the overhead of interpreting JavaScript code while the application is running, which results in poor performance as compared to Flutter.

2. Programming Languages:

Programming Languages

Discussion about Flutter and React Native will not be completed until we talked about their programming languages. Flutter comes with Dart whereas React Native comes with Javascript.

Dart:

Since 2011, Google has been using Dart as a programming language to build internal web, server, and mobile applications. That’s why it was mostly unknown to the outer world. But in 2017 Google officially announced Flutter beta for cross-platform mobile app development and Dart suddenly started getting more attention.

Dart is relatively new to the market as compared to Javascript. Dart is easy to learn for the developer who comes from the OOP’s background as it has Java-like syntax. Google has provided very detailed documentation for Dart, so any developer can work without major trouble. Apart from that, there are many online courses, tutorials, and articles available for Dart.

Dart has comparatively small community support so developers may find it difficult to get solutions sometimes. But nowadays most of the developers have moved towards Flutter as it provides better features and performance than other cross-compile platforms.

Dart uses both AOT and JIT for compilation, which makes it super fast in terms of development, debug, and deployment. In many benchmarks, Dart is an absolute winner as compared to Javascript.

Dart can support both loose as well as strong prototyping. Which makes it more type-safe compared to Javascript as it can find most of the code errors in the compile time.

JavaScript:

JavaScript was originally developed by Netscape in September 1995. It is a lightweight, interpreted, or just-in-time compiled programming language. Due to its flexible nature nowadays its widely used to develop for the web, server, and mobile applications.

Javascript is more mature and stable as it’s been in the market for a long time. Developers with a basic programming language can easily learn Javascript. In the market, there are tons of frameworks, libraries, and utilities available by using it developers can boost their development speed.

Many different Javascript frameworks are actively available in the market like React, React Native, NodeJS, Angular, Vue, etc. that’s why it has huge community support which makes it popular among developers.

Javascript may look lighter and faster as it is an interpreted language, and it is faster than many compiled languages like c#, Java, etc. But in terms of mobile benchmarks, Dart is way ahead of Javascript.

Javascript can support both dynamic and duck typing. Type checking is not strictly followed in Javascript due to which code errors can only be found during runtime. This is the reason Javascript is not type-safe.

3. Performance:

Once a legend said, “A fast app is great, but a smooth app is even better.”

Performance

An app’s performance on target devices is the most important parameter that everyone is looking for. In terms of performance, Flutter and React Native are way ahead as compared to other cross-compiled technologies.

Flutter:

Flutter uses a low-level Skia C++ engine for compilation which is similar to machine language and gives a better native performance. Also, Dart is quite a performant language on its own, which also boosts up Flutter’s overall performance. Along with this, Flutter doesn’t always require a bridge to communicate with the native components and systems which helps it to run applications in 60 frames per second. Flutter is better than React Native in terms of performance.

React Native:

React Native uses Javascript which is faster and better performant as compared to other languages but it requires Javascript bridge to connect to native components and systems, which results in poor performance as compared to Flutter.

4. Pre-styled UI components:

Pre-styled UI Components

Building a user interface in cross-platform technologies is more difficult than doing it in Native, as it needs to be aligned with design guidelines without dropping the performance. Every platform has its standards that developers need to follow, apps built for Android devices will not always behave the same visually and functionally on Apple devices. Having good styled-components support makes the developer’s life easy as it takes care of most of the work under the hood, so developers just need to customize the style or theme as per requirements.

There are many built-in as well as third-party styled-component libraries available in the market.

Flutter:

The Flutter SDK ships basic widget libraries along with two styled widget libraries i.e Material and Cupertino. Both libraries are based on different design guidelines. Material implements the Material design which can be used for Android, iOS, web, and desktop. So when we create a Flutter application using Material design, it will look and feel the same on any platform including iOS devices. On the other hand, Cupertino implements iOS design which is based on Apple’s Human Interface Guidelines, so if you want to make an app that looks iOS standard, then go with Cupertino. Although Cupertino can run on iOS as well as Android technically but due to some licensing issue Cupertino doesn’t have correct fonts for Android.

Along with these built-in libraries, Flutter also has some good third-party libraries like FL Chart, Liquid Swipe, BottomNavyBar, Before After, Giffy Dialogs, etc. These libraries are easy to use and customize.

React Native:

React Native has its UI component library but it is very limited in terms of behavior as well as look and feel. Therefore, React Native mostly relies on third-party libraries to create a visually appealing user interface. These components are written on top of the Native Android and iOS components that is why you will not notice any drop in terms of performance. As most of the components are written over the Native components, it might be possible that some RN components only support Android but not iOS and vice versa.

For React Native, there are many third-party libraries available in the market like NativeBase Components, React Native Elements, React Native Paper, Shoutem UI Components, etc.

These libraries can be customized with required themes and also have very good community support.

5. Native device features:

Native device features

Availability of easy to use native device features and hardware APIs make cross-compiled technologies favorable amongst the developer community. Every day engineers introduce new features and systems like NFC, biometrics, face reader, touchless interaction, etc to mobile devices, so keeping API up to date is a big challenge for the technology vendors. The way cross-compiled technologies and the Native system communicates with each other also affects the performance.

Flutter:

Most of the native features like geolocation, audio, sensor, etc. are either already available in Flutter or are at the development and review stage. Flutter uses Flutter Engine as a portable runtime for hosting, it includes Flutter’s core libraries, file, and network I/O, accessibility support, animation, graphics, and plugin architecture which provides a strong foundation for native communication. Flutter doesn’t need any bridge to communicate with native components, so it works very well in terms of performance. Also, there are many third-party plugins available in the market or you can write your own native code in Java or Swift to communicate with native APIs.

React Native:

React Native provides some native APIs out of the box but for most of the native features, it strongly depends on the third party support. Because of good internal and external support for native features like camera, NFC, Bluetooth, geolocation, etc., developers can communicate with native systems. As it provides React Native Bridge for iOS and Android, by using this developers can create a communication bridge between Javascript code and native system.

6. Community support:

Community Support

No matter how good the documentation is, developers will always come across problems where they need some support, this is where the community plays a very important role. Nowadays every technology has its community forums and groups, where developers can share their knowledge. Having a strong community always helps developers to learn from each other.

Flutter:

Since 2017 Google announced Flutter beta, it’s getting popular day by day within the developer community. Comparatively, Flutter has a small but growing community officially supported on multiple channels where developers can share their knowledge. Flutter has provided very detailed documentation that makes a developer’s life easy. Still, sometimes these are not enough resources that solve the developer’s common issues.

React Native:

React Native became the first choice among developers as cross-platform mobile technology. It has a good amount of community support on GitHub for developers. React Native uses Javascript as a coding language and there is huge support available for it. Facebook conducts lots of meetups and conferences around the world which helps developers to keep them updated.

Summary:

Flutter and React Native both are powerful cross-platform frameworks, their ready-to-use components and third-party libraries help the app to achieve native-like performance. They both have good cross-compile support that not only speeds up the development but also reduces project costs.

Thank you very much.

--

--