Have you got a business-objective?
We have a solution.
Get a consultation right now!
Cross-platform app development is all the rage nowadays. It is easy to understand why: it costs a lot less and it is faster to develop one cross-platform app for Android and iOS than to build two separate apps from scratch. Building a cross-platform app is made easier with all the frameworks created with this purpose in mind. React Native is a veteran in this field, but its new competitor, Flutter, has been gaining popularity lately.
If you are hesitating whether to use React Native or Flutter for cross-platform mobile development, we have prepared a comprehensive overview of both tools.
React Native came to the scene in 2015. It is open-source, and it is originally created and mainly supported by Facebook. Thousands of apps were built using React Native, including Instagram, Skype, etc.
Chances are you haven’t heard a lot about Flutter yet. The reason is that Flutter is a relatively fresh tool that was released in 2017. This framework was developed and is supported by Google. It is open-source as well, and it supports creating apps for Android, iOS, and a relatively new OS, Google Fuchsia.
There are three obvious things Flutter and React Native have in common:
they are open source;
they are developed and supported by major IT corporations;
they are created for developing cross-platform mobile apps.
That’s all. There are a lot more things we need to compare to make conclusions. Let’s compare React Native vs Flutter to figure out what is the difference between Flutter and React Native.
In case of React Native, you can count on most Android and iOS native APIs. Official native APIs include the ones for WiFi and location services; however, there are only unofficial (i.e. third-party) APIs for Bluetooth, biometrics, camera, sensors, NFC. The good news is that you can always find third-party APIs for this hardware. One significant drawback to React Native is lack of support for drawing customizable graphics.
As for Flutter, it supports most hardware and sensor APIs except for Bluetooth and NFC. However, you should keep in mind that Flutter is quite young, and some APIs are in an early stage of development. This means that you could run into various issues when using them, and you may need to wait until some hardware gets fully supported. For instance, dynamic online maps support is still in development.
You need to know Dart to use Flutter. Dart is more of a niche language, so it may be quite a challenge to find developers that are ready to start using Flutter right away. However, Dart learning curve is not steep, especially if you are an Android developer familiar with Java and/or Kotlin. Although, it would take iOS developers more time to get used to Dart.
Performance is one of the most prominent advantages of Flutter that turned it into a hot topic. The thing is, Flutter apps function without a bridge to interact with native components. It addresses the components directly, thus saving time and increasing the app’s performance. This means complex apps built with Flutter are faster.
One more important difference here. Creating the user interface with React Native means tapping into native components.
On the one hand, it allows creating apps that are indistinguishable from native ones. Besides, React Native allows creating different interfaces for different platforms. On the other hand, it comes at the cost of the app’s performance and portability. Besides, you sometimes have to look for third-party UI components libraries.
Flutter has a completely different approach to building the UI – using customizable proprietary widgets:
Material Design (Android);
widgets for texts, animations, etc. that can be used for any platform.
This approach allows creating fully customized UIs which gives developers more freedom to implement the best UI possible. Moreover, apart from better customization opportunities, this leads to better performance and portability. At the same time, such a UI will feel native and intuitive to users.
On the other hand, the Cupertino library may not be enough for creating a feels-like-native iOS interface as it lacks some essential UI components. As for per-platform UIs, this part of the job may be quite tedious as you need to detect what device is being used first and then build the needed layout.
As for Flutter, the situation with testing is not that good either. While the unit testing tool that comes with Dart is excellent and smooth, integration tests are more complicated to perform. Yet, there is also a flutter_driver package for performance testing.
This is one more aspect that makes a clear distinction between the two frameworks. Flutter has a completely different approach to structuring the code (in comparison with React Native): it doesn’t distinguish data, style, and template in the file.
On the one hand, this decreases the code readability and makes it messier in general. On the other hand, some developers find this approach to be more convenient and easier. There is no need to use additional visual tools or templating tools if you use Flutter – this allows creating an app only by writing code. Besides, you will save time with Flutter as you don’t need to switch between the design mode to code and the other way around.
Considering that React Native has been out there longer than Flutter, it is definitely the winner in this nomination. React Native is supported by almost every widely used IDE available out there. Flutter, on the other hand, is supported only by a handful of IDEs:
One advantage that React Native certainly has over Flutter is its community. Let’s compare the GitHub stats:
Stars: 68,000+ (React Native) vs 36,000+ (Flutter);
Contributors: 1,700+ (React Native) vs 230+ (Flutter);
Commits: 14,300+ (React Native) vs 11,700+ (Flutter).
Thanks to those dedicated React Native developers, you can find a third-party API even if there is no official one. As Flutter community is not that vast yet, it may be more difficult for you to find third-party solutions that could make the development easier or just answers to your questions.
However, we need to remember that Flutter has achieved such stats in just a year. If it keeps gaining popularity that fast, perhaps we could even see its community grow bigger than the React Native one.
Read also: How To Hire The Best React.js Developer?
No framework is without flaws. Even if we compare all the pros and cons of Flutter and React Native, your choice depends on the specific requirements of your projects.
React Native would be your best choice if:
you need to build an app that would run on both Android and iOS platforms with per-platform native, intuitive UIs;
you need a stable time-tested development tool.
In turn, Flutter can be a good option for you if:
you plan on creating a highly customizable UI;
you are ready to deal with bugs and explore the uncharted territory.
In our humble opinion, Flutter is too young, and this could be the main reason why well-known brands are not using it yet. It needs to be time-tested and improved. So, if you are not willing to spend time figuring out how to make the best out of the framework, good old React Native is a way better choice.