React Native vs Flutter: which one should you use?

In recent years, cross-platform mobile development was steadily picking up speed, as more and more companies realize they can save time and money by switching from native development to cross-platform. There are a number of frameworks to help you with that, and in this post, I will compare two most popular ones: React Native and Flutter.

What is React Native?

React logo

React Native is an open-source mobile application framework developed by Facebook. It is based on a wildly popular React framework, so it has a huge community and libraries out of the box. In React Native you write your code once in JavaScript and the engine later packages it in an APK or IPA file for deployment. It was first introduced in 2015 at React.js Conf and has been growing steadily ever since.

What is Flutter?

flutter logo

Flutter is another open-source (partly) mobile development framework. Google created this framework to target Android, IOS and Google’s new OS, Fuchsia. Flutter has recently moved out of beta and reached a stable release. It is solving the same problem React Native is, but in a slightly different way. For instance, Flutter is using Google’s own programming language, Dart. It was released about 2 years ago, but already got traction and is catching up with the rest of the frameworks.

What are the similarities?

Both frameworks follow the cross-platform development philosophy, which basically means write once, run anywhere. React Native and Flutter apps run on Android and IOS, among other platforms. Both of them allow writing native code (Kotlin/Java for Android, Swift for IOS, etc) in cases where the framework is not sufficient. This may include performance-sensitive areas and usage of specific APIs which may not be supported by the framework.

These frameworks are open-source as well. Open-source means their source code is freely accessible and anyone can contribute to any of these projects directly by writing code. React Native is licensed under MIT license, while Flutter uses New BSD.

What are the differences?

First and foremost, Flutter and React Native use different programming languages. React Native uses JavaScript, while Flutter requires you to write in Dart. Dart is a language developed by Google specifically for this framework. If you want to learn more, check out this tutorial. I can say that people find JavaScript easier and this means React Native will have a smoother learning curve.

There is also a fundamental difference in the way these frameworks package the applications. React Native ships your JS code alongside the main package, which contains the JS runtime and supporting libraries. Flutter compiles Dart code to native machine code. This means there is no overhead of JS runtime, which results in performance improvement. If performance is crucial to your problem, Flutter is probably the way to go.

You should also carefully consider which platforms you are targeting. While both frameworks fully support Android and IOS, there are additional platforms available. React Native can also build a Windows app that can be distributed through Microsoft Store, macOS and tvOS, Linux, Turbolinks and even web. Flutter currently supports Web and Desktop configurations, though they are still experimental.

fuchsia logo
Fuchsia OS looks really promising

Flutter still has one more trick up his sleeve. Fuchsia, Google’s rumored upcoming OS, supports Flutter natively. It is still unclear will it ever reach a stable version or end up at The Google Cemetery. But investment in learning Flutter may yield a high return in case Fuchsia gains traction.

In the nutshell

You should consider your project requirements and problem domain when choosing between React Native and Flutter. If your team already knows React, it would make sense to go with React Native. If you want to learn something new, or performance is important, Flutter may be the way to go.

Thank you very much for reading. If you have anything to add, please do share in the comments and let me know!

Get new content delivered to your mailbox:

one comment

leave a comment