What do I Choose Flutter Or Reactive Native 2022?

Muhammad Hassan
7 min readJul 24, 2022

--

Do you know, Flutter is a Future?

It was the sole reason that the tech giant Google came up with Future of Flutter one of the best Cross-platform app development frameworks to date.

Flutter and React Native: Cross-Platform Frameworks

Both Flutter and React Native are among the best cross-platform development frameworks available today. They both use native widgets to deliver a highly customizable, responsive UI while sharing code across different platforms.

The Flutter framework is developed by Google while the React Native framework is developed by Facebook, so these tech giants have very large teams dealing with everything from the platform’s SDKs to its documentation, support, etc.

While Flutter and React Native apps are both native, they are advantageous over traditional native app development because they can share a significant proportion of their codebase across platforms.

According to Instagram, the amount of code shared between iOS and Android via their React Native features was over 90%.

How to Flutter and React Native compare

The main difference between Flutter and React Native is that React Native does not compile into a native mobile language (Java, Swift, Objective-C), but rather simply runs its JavaScript code. Flutter, on the other hand, compiles its Dart language into native, which can impact performance (discussed later).

Another big difference is that vanilla JavaScript (besides JSX) is used for writing components on React Native. Facebook developers recommend using Flow or TypeScript when with React due to its dynamic nature. For Flutter, Google recommends using Dart for writing code as well because of its static typing system.

In our opinion, the decision on which of these 2 technologies to choose should be based more on your preferences rather than on their actual features and capabilities.

Of course, it’s good to know all programming paradigms so you can easily pick up new languages and frameworks even if they’re not written in a language you’re familiar with.

Programmers who are already familiar with JavaScript (ES2015+) or TypeScript/Flow will find it much easier to start working with React Native. This is particularly true of developers that have used React for the web, as there is a great deal of overlap between React and React Native.

JavaScript still has a significant market share in the mobile development space, and because both React Native and Flutter allow you to choose your favorite programming language, it’s hard to say which one will be more popular in 2022.

There are also other important factors that might influence this decision, such as:

– Companies’ preference toward a specific technology stack

– Developer’s familiarity with a given language/framework

– Availability of developers with skills necessary for using a specific technology

As we have already pointed out, Flutter is Future as a comparison to reactive-native but both going to be significant players in 2022, so it’s up to you to choose which is the best option for your long-term goals.

Although cross-platform mobile development frameworks share many concepts and features, they’re each created with different goals in mind.

Pros and cons of Flutter and React Native Apps

Apps created with Flutter are indistinguishable from native ones. They come with the same performance and the same look & feel (apart from some platform-specific stylistic aspects).

The main issues that people usually complain about when building apps using React Native are related to its runtime environment, which is heavier than managing separate processes for each architecture. This means that you will not be able to pull off a pure native app performance using React Native, although you can get close.

Flutter does not come with the same benefits as React Native in terms of supporting existing JavaScript codebases and allowing reuse of some components shared between apps for iOS and Android.

Now, let’s dive a little deeper into the technical pros and cons of these two frameworks.

Pros and cons in terms of native performance

React Native comes with an improved JavaScript virtual machine that is faster than V8 thanks to its JIT compiler. It also benefits from being an ahead-of-time compiled framework, which means that you are free to ship whatever codebase you need because it will be compiled into a native executable.

In practice, React Native is as fast as pure native apps because it can achieve the same performance as an iOS app without requiring any changes to the iOS build settings.

Flutter comes with its own Ahead-of-time compiler that will emit optimized code for both iOS and Android once you have built your project. You get native performance without having to ship the whole codebase in your application binary just like with React Native.

Pros and cons in terms of app size

React Native apps usually come with a JavaScript runtime that weighs about 300kb gzipped, although it is possible to reduce this number by tweaking some options such as Bypass filling (which will force React Native to skip the process of filling its virtual DOM with the result of diffing it against the native UI) as well as by setting use developer mode to true (which will resize images in memory and reduce their quality).

Flutter comes with an ahead-of-time compiler that allows developers to ship only the codebase needed for the app they are building without having to bundle anything with it.

It is possible to run Flutter inside an existing JavaScript VM if you want to, which will allow you to save on the space needed for your app.

Pros and cons in terms of minimal required SDK version

React Native can usually be built against any iOS 9+ or Android 5.0+ SDK without any problem, but it goes without saying that to achieve the best performance you should target the latest SDK versions available at the time of your release.

In practice, React Native apps can be built against older iOS and Android SDKs with a limited set of features being available at runtime, although to get all the features you should still target the latest SDK versions available.

Flutter apps can be built against Android version 21 (Lollipop) and newer, although it is recommended to build against the latest SDK versions available for best performance.

Flutter can be run on iOS 8 or newer but calling some APIs may result in runtime crashes given that Apple has deprecated most of the APIs that Flutter uses.

Pros and cons in terms of UI development

Flutter comes with its own set of widgets for rendering the UI, which means that you can reuse existing iOS or Android code when building Flutter apps.

Some third-party libraries are available for making it easier to reuse existing native components, although this is still a work in progress as it is not easy to map Flutter widgets to existing iOS and Android UI components.

React Native comes with a bridge that allows you to reuse existing iOS and Android code as JavaScript modules as well as expose some APIs for manually creating the bridge between your native UI components and the JavaScript code that will handle rendering them.

Pros and cons in terms of debugging

React Native comes with its own debugger that can be attached to your running app on iOS and Android, which provides developers with a preview of the current state of the JavaScript virtual machine along with various tools for inspecting memory usage or tweaking some options on the fly.

Flutter comes with its own debugger as well, which can be attached to your running app on iOS and Android providing developers with a preview of the current state of the rendering engine as well as various tools for inspecting memory usage or tweaking some options on the fly.

Pros and cons in terms of code reuse between mobile platforms

React Native comes with its own set of APIs that can be used when developing both iOS and Android. Although most companies using React Native will develop their apps on one platform first (usually iOS) before porting them to the other platform, it is also possible to write shared components between your iOS and Android applications if you so wish.

Flutter apps are built with code that is platform specific, so it is not possible to share any code between your iOS and Android application. However, third-party libraries are available for making it easier to reuse existing native components.

Summary

Flutter was created mainly to fulfill Google’s needs for… Google.

In other words, another attempt at marrying fast development cycles with native code performance and building reusable UI components that can be shared between iOS and Android apps. This is why Google’s Flutter is so much faster than React Native.

Flutter was also designed with the idea of making app development easier and more accessible because it allows writing code using Dart, a language that can be learned in a weekend and mastered in days or even hours depending on the developer’s skillset.

This is why we believe that Flutter will be the mobile development framework of choice for companies that need to create lots of native mobile apps very quickly without sacrificing performance or features.

Thank you for your time and Feedback!!🤩🤗

--

--

Muhammad Hassan

Open Source Contributor || Technology Evangelist || Flutter Developer || Public Speaker ||Community Builder