Seriously having a hard time coming up with cons, so here are my reasons why I like it:
- dart is super easy to use
- pub dev is nice, and using forked packages is easy
- great community support
- works for every use case I've encountered so far (push notifications, social logins, maps, video calls, background stuff, chat, etc.)
But of course the primary advantage of RN is the ecosystem of developers and libraries it comes with, so if those are important to you I don’t believe Flutter will catch up any time soon. Personally I think those are a bit overrated. Any competent JS developer could pick up Dart very quickly, and all the various bits of browser knowledge a front end developer would have that are more valuable wouldn’t be applicable here, so to me “used before” only offers rather modest gains, and over the long run isn’t much to base a decision on.
What I would not use Flutter for yet is Flutter Web. I've made that mistake, and although it was a big success in the end, we had many many hurdles, some of which are serious bugs that remain to this day (like you can't autofocus a field, flickering, extremely slow scrolling, etc).
There are one or two other technologies/ standards that are an important piece of the puzzle like the accessibility object model to start to decouple accessibility from the rendered DOM interface for example and allow canvas based interfaces to become better supported.
But I follow a lot of that stuff pretty closely and 2-3 years seems like more than enough time, a bunch of it is probably slated to happen as early as this year (WebGPU behind a flag already on all browsers I believe, WasmGC under active development in all browsers, dart already has a functional WASM compiler and a new graphics engine ready to go and take advantage of it etc..)
Some basic details here for anyone interested in this topic https://youtu.be/kCnYRhkfWHY
The following example comes to mind. react-native-fs is the most popular lib for filesystem I/O. From Android 10's release in Sep 2019 until Feb 2022, all file overwrite operations on Android 10 and later would result in the file getting corrupted if the new file was smaller than the pre-existing one. Related issue: https://github.com/itinance/react-native-fs/pull/890
That's a very long 2 year and a half.
My intuition to explain this situation is that the intersection of these two is very small: - orgs using RN, and thus willing to maintain it - orgs staffed with experienced Java/Kotlin or ObjC/Swift developers with the good understanding of native Android/iOS APIs needed to maintain RN libraries
I don’t know much about flutter.
This includes libraries from major companies that were incomplete (as in didn't implement functionality that they claimed to have in the repository readme file), badly broken, and nearly no documentation.
Once I realized how common this was, I just implemented my own native components when required. React Native itself was and is very good, good enough to make it worth using despite the minefield ecosystem.
If you’re starting a project tomorrow, you can easily find 100 developers with years of React experience, where there are barely any experienced Flutter devs.
At that point, might as well go completely native.
Here’s a completely arbitrary one from just yesterday that focuses on supply chain security (https://opensource.googleblog.com/2022/06/Dart-and-Flutter-e...) but this kind of thing is happening on an almost weekly basis in the background around Dart and Flutter. I don’t think people understand what’s happening behind the scenes on these projects but they are developing some very solid fundamentals to build on top of into the future.
Seriously take a look at this basic language tour, it’s incredibly familiar for anyone with an OO background out of the box https://dart.dev/guides/language/language-tour
And nearly all of them completely useless. Most react devs don't even understand Fibers or have any empathy with DOM, javascript, and other parts of the common web stack, most can barely explain when something will render, what memoization is, what reference equality is and so on. It's easy to breach the 10x factor as React dev and 100x is achievable.
I’m trying to find it now but not having a lot of luck as it was a random Twitter thread that was pulling in a bunch of things from various sources, so take it for what you will in the meantime.
For what it’s worth as someone who has spent a bunch of time with Flutter at this point, none of that surprised me to hear, it’s actually a really pleasant experience, the tooling is amazing and unlike anything I had seen before as all of my experience was with web before.
It’s underlying architecture feels really solid, also despite people talking a lot of trash about it, it turns out Dart is actually a really great language as a mix between C#, Java, Kotlin and JavaScript of sorts.
I think every serious criticism I have seen levelled at both Dart and Flutter is also actively addressed on their roadmap so I also feel extremely good about the future direction of both projects.
Like in short, probably the best thing I’ve discovered in a few years code wise, would recommend checking it out.
From a developer resource perspective, however, you use react native because it lets you share developers across platforms. Similar to how you might use nodejs on the backend for the exact same reason. If you’re splitting your developer resources anyway, I would frankly just go native mobile department.