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?
What is Flutter?
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?
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.
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!