Flutter vs React Native- What You Need To Know.
Flutter allow developers build apps for both iOS and Android at once while using the exact same code. This may sound like a giant leap for Flutter but it still has a long way to go in catching up with React Native. At the moment, developers who are mentally bucketed with React Native are not even seriously considering Flutter. Although I believe Flutter might be the future of mobile app.
5 quick takeaways about Flutter:
- It is the Dart Language. Say what Dart? !!! That's the reaction of most developers.
- The recommended IDEs with Flutter plugins are Android Studio or Intellij Idea.
- React Native and Flutter share similar paradigms like event handlers and class extension.
- Flutter's animation and install experience are really good and smooth respectively.
The question most people ask when they get acquainted with Flutter for the first time is "Is it like React Native?"
To answer this question, our developer Viktor Gavrilov took Flutter for a spin and here are his findings:
On Adding packages:
In Flutter, everything is connected automatically. However, in React some native modules are connected manually.
We connect the packages via the built-in "package manager" thanks to which we do not have to connect via Xcode CocoaPods, React Native link as we usually do, connecting the packages through npm to RN.
We add to pubspec.yaml. the package, which we previously found in https://pub.dartlang.org/flutter and execute the command:
“flutter packages get”
And it doesn't matter, it's a map_view or left_pad package, everything falls into place without problems!
On the bright side (Pros) of Flutter:
- Dart language. Dart — OOP, it is rather verbose, but those who write in Java / C # will happily look towards Dart.
- Less writing in the settings for the start of the project manually, in contrast, to React Native.
- Just download Flutter from the git, do a “flutter doctor”, which will tell you what kind of problems you might have in the system. Then create a project from Android Studio or any IDE after preliminary putting of Flutter Plug-in and start the project. There is also a Hot-reload just as in React-Native.
- Excellent support for IDE (Android Studio, IntelliJ idea, VSCode)
- Built-in navigator. Having created an application on Flutter, you might be surprised that it has in-built Navigator. You can create a new route without connecting anything (unlike in RN, where you need to connect any of native navigation packages etc.);
- Ready-made data management solution. i.e in Flutter this is “Everything has a Widget”, for it. There is a special StatefulWidget, With the help of which we can manage the widget state and change it dynamically.
On the flip side of Flutter (The Cons):
- A large threshold of occurrence. Due to the fact that Dart is used, with its inheritance, polymorphism and all OOP buns, for those who only study JS, or come from RN, it will be hard.
- There is no JSX to which we all got used to after RN. Look at the Dart file in which there is no division into the template, styling and working with the data, it becomes unpleasant.
- Styling is a pain. Considering the fact that there is no separation into Styles, templates, and controller, there is a problem that when describing a component, we also need to describe the styles at the same time.
- The animation is kind of more difficult. Though it has some good animations, it is more difficult to animate unlike in RN.
- Optimization. In Fluter, there is only the widget inheritance with a changeable (stateful) and non-changeable (stateless) conditions. While in React-Native we can manage the life cycle. Also, a big drawback is the lack of tools to save the state of the application, this problem can, however, be solved by serializing the current state.
Finally, Flutter will have a great future if they can come up with a way to reduce code writing on Dart, replace any functionality class declaration, and JSX or XML as a description of the structure of the widgets.
On the work of Flutter plug-in for android-studio, you just create a project and write, like in JAVA.
Let us know your thoughts on Flutter in the comments section.
Any questions? Feel free to contact