Is Flutter stable in 2018

Which should one choose to develop mobile apps - Flutter or React Native?

Mobile apps are becoming more and more popular. And many companies would like to get a piece of the pie. Instead of developing separate apps for Android and iOS - which is time-consuming - they are more often turning to cross-platform frameworks - which make it possible to create apps for both operating systems from a single code base. Google and Facebook have released open source tools designed to help with just that - Flutter and React Native.

What are the benefits of using cross-platform frameworks?

Before the cross-platform frameworks, we had to develop different apps for each system. Most of the time, it required developers who are familiar with both systems, or separate teams for each system. Developing and maintaining multiple code bases was very expensive. By using cross-platform frameworks, it's possible to have just one code base for Android and iOS (and sometimes even for web and desktop - more on that later in this blog post). This simplifies the work, lowers the cost of development and also helps to maintain a consistent user interface across different platforms. But which framework is better? What should I choose for my project? I'll try to answer those questions in this article.

Flutter - native mobile apps with material design

Flutter is a toolkit for building native apps for mobile, web and desktop. The first stable version was released in 2018 and has grown rapidly in popularity since then. At the time of this writing, Flutter is only ready for production for mobile apps. The tool for building applications for the web is in beta and the desktop tool is in alpha. You can read our opinion on this in the technology radar.

React Native - mobile apps with a native look and feel

React Native is a framework released by Facebook in 2015. It is used for developing native mobile apps for Android and iOS. Third-party libraries can also be used to build web and desktop applications. You can read more about this in our technology radar.

Which framework is better for my project - Flutter or React Native?

Both frameworks are supported by large companies and a large number of developers, they help in creating cross-platform applications, are open source software and are very similar. The decision to use one or the other platform is not an easy one. Let's go into detail - we have some important questions to answer!

What language do the tools use?

React Native uses the most popular programming language of the moment - JavaScript. This is a great advantage since many developers are already familiar with JavaScript. It works fine with TypeScript too.

On the other hand, Flutter uses a language created by Google - darts. It's not as common as JavaScript, but the syntax is similar. From a new developer it would require learning not only the framework but also the language used.

Which framework is more popular?

React Native is more mature than its younger competitor, Flutter. The repositories for both tools have a similar number of stars on GitHub (Flutter - 86.1k, React Native - 84.6k), but React Native has a much larger number of developers contributing to the project (more than 2k). The popularity sure speaks in favor of React Native - there are plenty of resources to learn from, many people ready to help, and a high chance someone has already encountered problems that you may encounter too .

However, the Flutter, released in 2018, is becoming increasingly popular. In Stack Overflow's last annual developer survey, it was ranked third among the most popular frameworks (here). Flutter is a trend right now and if it continues it may soon outperform React Native.

React Native is battle-tested and used in the development of thousands of mobile apps - such as Facebook, Instagram, Skype, Uber, and many, many others. Flutter's testimonials aren't quite as impressive - some of the most popular apps are Google Ads, Stadia, Reflectly, and Alibaba.

What's easier to install?

The installation of both frameworks is straightforward. The entire process of installing and setting up the development environment is very well described in the documentation for macOS, Windows and Linux. If you're new to mobile development, React Native provides an easy way to get started with the Expo CLI, which comes with a few limitations - like a larger app scope and lack of support for some APIs (learn more about this here).

Which framework has the better documentation?

Flutter's documentation is more extensive than React Native's. It contains tons of how-tos, examples, tutorials, hints, and solutions to common problems. Everything is nicely divided into easy to navigate categories. The API reference shows a ton of examples, how-tos, and videos for some widgets, which makes it easy to understand.

Which framework offers a smoother development experience?

Developing applications on virtual and physical devices is not a problem for either tool, as they provide instructions in their documentation. Both come with utilities to help developers do their jobs - like Hot Reload and CLI. CLI can generate, execute and build a project. Hot Reload saves a ton of time as the changes you make will appear almost instantly on a device without having to recompile the entire app. Both toolkits are supported in most of the major IDEs through plugins and additional tools.

Which one has more functions?

Flutter has built in many more features and components that are immediately available. This is great because you can be sure that the Flutter team will support you in anything and you will not have any problems with them. On the other hand, the number of components in React Native is smaller and depends heavily on third party libraries. While known packages are fairly safe to use, other packages can come with some risks (such as sudden abandonment by the developer, lack of support, or security and compatibility issues). With React Native, you'll find that you'll be jumping back and forth a lot between the official documentaries and the third-party documentaries.

Which framework is faster?

Flutter's dart code is translated into native machine code. React Native uses something called a JavaScript bridge - the JavaScript code is translated natively at runtime. In theory, Flutter should be faster. The problem is that there aren't many performance tests on more complex apps and a lot depends on the device you're using. With some devices, Flutter is closer to native performance, with others it is React Native.

Which UI components are available?

React Native uses native components for UI rendering. That means apps will look and feel more like native applications. Flutter takes a different approach - it uses the same user interface for Android and iOS. This gives more control over the design and ensures that the app looks the same on every device. Flutter also optionally offers "Cupertino Widgets" that fit into the iOS design. React Native has fewer components than Flutter, so more third-party modules must be used.

Which community is bigger - Flutter or React Native?

The community is a big advantage of React Native. It's very active and has twice as many questions on Stack Overflow as Flutter. Thanks to this, it is possible that the problems you might encounter during development have already been encountered by other programmers. It also means you'll find more libraries for React Native than for Flutter.

Flutter uses the package manager Pub and React Native NPM (a registration of JavaScript packages in general).

How do you test mobile apps?

Testing in Flutter works great. The documentation provides good documentation on testing with recipes and examples for unit, widget and integration tests. React Native is different - you have to use external tools to test (Jest is included by default). The documentation for RN doesn't say much about testing, but the good thing is that you can use one of the many JavaScript testing frameworks available. There are also tools specifically designed for testing React native apps.

With which framework will the native mobile app be easier to implement?

The size of an app tends to be a bit larger with Flutter than with React Native. React Native is lighter because it doesn't have as many features as Flutter. They're still bigger than pure native mobile apps, but the developers on both teams are constantly working to improve them.

But what about the deployment? Flutter's documentation has great step-by-step instructions for publishing apps on the Apple App Store and Google Play Store. There is also a helpful guide for configuring auto-provisioning. React Native can't quite keep up here - the documentation only shows how to publish in the Google Play Store, not in the App Store.

What to choose for mobile app development in 2020 - Flutter or React Native?

React Native is certainly a mature and practiced framework. A large community and large number of apps in production prove that it is a safe choice when it comes to mobile app development. While reliance on third-party libraries allows for a lot of freedom, it can also increase development time and cause unexpected problems. The documentation is one of the weakest points compared to Flutter.

Flutter is packed with a ton of features and components that are not available in React Native. Often times, you won't even have to resort to external libraries. The documentation is comprehensive and contains many instructions and examples. The biggest problem with Flutter is that the tool is still so young. There aren't as many companies using it as React Native, and the community isn't that big, but it has grown in popularity quite quickly since it was released in 2018 (and current trends show this isn't going to stop anytime soon ). I can well imagine that in the future it could come close to or even surpass React Native.