By Federico Ojeda

Mobile development has won over the world, with companies shifting their priorities to their mobile products. With this global domination of sorts, companies have been finding and developing newer, better ways to progress. Frameworks, although started out with the development of hybrid apps showing a website inside an application, have been evolving into creating fully native apps that are spread into hybrid technologies – truly amazing!  Presently, the two most popular frameworks out there are React Native and Flutter. While they both have similar (if not the same) goals, their structure and strategies are quite different. They both are used to develop for iOS and Android applications while using only one codebase, and the following passages explain how each of these frameworks achieve what they do, as well as point out some pros and cons.

React Native and Flutter are two most popular mobile frameworks

 

What is React Native?

React Native is a framework developed by Facebook that lets you write mobile applications using Javascript. Specifically it uses React, a popular web framework, to render the UI. There are a lot of frameworks that have used Javascript for applications, such as Phonegap or Cordova. The main difference between these and React Native though, is that the latter outputs a completely native UI in 60fps with native components. The others use web views for the UI too, usually causing performance and user experience issues.

But how does Javascript actually provide a native UI? Think of it this way. Your entire application runs in what’s called a Javascript realm, a native thread that runs the Javascript application logic.  Whenever something needs to be rendered, such as a change in the size of a view, the Javascript realm communicates to the native realm though a Javascript bridge. This bridge is responsible for serializing and sending every event through. You now have a Javascript application running, and whenever there’s an event that needs some native action, it’ll notify you with an event through the bridge. Easy!

React Realm

 

What is Flutter?

Flutter, too, is a newer framework developed by Google and provides you the tools needed to develop a fully native application for both iOS, Android and other platforms. Although the end goal is the same, Flutter is significantly different from React Native.

A big, perhaps the biggest, difference is that Flutter compiles the application to native code. It doesn’t consist of another application running which then communicates it to a native project.  Basically, this means that whatever program you write will end up compiled into a native language that both iOS and Android platforms will understand immediately. In most specific scenarios, this may lead to a better performance of the application as a whole.

This also entails that everything (yes, every single thing) is controlled inside the framework.  Flutter doesn’t use the native widgets provided by each platform but instead, offers its own widgets that resemble the standard ones. For example, if you want to use a button, Flutter will provide one that looks the same as the native iOS button, but really provided by the framework.

Native Realm

This does make it easier to provide your own design for widgets such as lists and buttons. On the other hand, it also makes it harder for the framework to stay current with new native components released.

Dart is the language used by Google for Flutter. It probably doesn’t sound familiar, but it looks similar to what anyone has used in Java or Javascript before. It’s not just basic and definitely worth getting to know.

 

How do they compare?

You now have a general outlook to compare between React Native and Flutter, but there’s more. Usually when you need to select a platform to develop an application, the decision is not solely based on the architecture or if the framework is bright and new. There are a lot of other aspects to analyze too, such as community, the existence of third party solutions to common problems, and platform maturity.

As of now, React Native is more established, and a more well settled platform. It has been around for a longer time and has grown into one of the largest communities, providing solutions to just about any problem out there! Developer adoption and reception is wonderful, too. On the other hand, Flutter looks promising, but as a forecast for the future. It’s core concepts are truly interesting with its beta version released not too long ago. But being newer doesn’t always mean being better, it means more of an analyzation which will pass with time.

In the end, our vote’s with React Native!