DEV Community

loading...

"Flutter is better than React Native". Thoughts?

mirhsquadri
I am technical content writer with a passion for coding. I have a master's degree in AI and a bachelors in Computer Science. I love learning new technologies and writing about them.
・1 min read

So I am writing a research based article for a tech magazine on why Flutter is better than React Native. Just wanted to get fellow developers' take on this matter. If you have experience using both these frameworks, do you agree with my statement? Please provide reasons for your agreement/disagreement.

Discussion (28)

Collapse
codenameone profile image
Shai Almog

The market has clearly spoken in favor of flutter: insights.stackoverflow.com/trends?...

I shared my thoughts on this matter here: quora.com/Which-is-going-to-domina...

Collapse
hasnaindev profile image
Muhammad Hasnain

Hmm, so, flutter is better because it is popular?

Collapse
codenameone profile image
Shai Almog

Because it draws its own widgets. That means it's properly cross platform and not a half measure like react native.
If you use react native you run into platform specific problems. Write once, debug everywhere. Might as well go all the way and write a native app. Flutter (and Codename One BTW) doesn't have that problem. It's truly portable and lets you customize everything.

Thread Thread
hasnaindev profile image
Muhammad Hasnain

Makes sense. Thanks!

Collapse
mirhsquadri profile image
mirhsquadri Author

What are your thoughts on Flutter?

Thread Thread
hasnaindev profile image
Muhammad Hasnain

I haven't used either but I always advocate for using the tools that are right for YOU and right for the job. There are an infinite amount of opinions and conventions. If you work for company X, name variables a certain way, declare them in a certain sequence. Enter line break here, remove line break there. Choosing tech-stack isn't any different.

It is just stupid and a waste of time. That's why I say, pick whatever is right for your team and your needs. Right tool, for the right job. If you want to get a job or freelance, choose whatever is hyped and mainstream, make money while you can and jump to the next new hyped technology, repeat.

Collapse
mirhsquadri profile image
mirhsquadri Author

I read your answer at Quora in detail. Thanks for the analysis. I am inclined to believe so myself. I just have question. In your answer you mentioned dart as being 'less desirable'. Is that a comparison against JS or are there some inherent issues with dart? I know that it is OOP language which is on its own not a good thing. But are there other issues you have encountered?

Collapse
codenameone profile image
Shai Almog

OOP is wonderful. I mean that Dart has been around for years and no one picked it up for anything. Not even Google. Kotlin and Typescript were winning hearts and minds based on the strength of the languages themselves. Dart had no traction before flutter. Even the Android team within Google didn't want to use it.

It also suffers from the inherent overhead of non-JVM languages on Android. It's amazing to me that Google would pick a cross platform solution that works worse on Android than on iOS...

Thread Thread
mirhsquadri profile image
mirhsquadri Author

I wonder what motivated them to choose dart...

You mentioned OOP is wonderful. Are you speaking in terms of mobile app development or just oop in general.

Thread Thread
codenameone profile image
Shai Almog

This was built by the Dart team at Google. Dart was dying so they built a platform to help it gain traction. It worked way better than I thought.

OOP is wonderful for everything. In cross platform specifically encapsulation is crucial. Polymorphism is amazing for widget systems etc.

Collapse
mirhsquadri profile image
mirhsquadri Author

Also, what are your thoughts on Flutter for Web Development?

Thread Thread
codenameone profile image
Shai Almog

It's not a web development tool. It can be used to replace things you would have historically done with Flash but it isn't meant for building websites.

Thread Thread
mirhsquadri profile image
mirhsquadri Author

Flutter has tried to expand its domain into the web thus attempting to replace Vue and NextJS. But there are many differing opinions on it.

Thread Thread
codenameone profile image
Shai Almog

Technically it isn't really an equivalent of most web tools. If you would inspect a flutter or Codename One app in the browser you would see "weird stuff". That's OK for some use cases but it isn't really "web".
It runs in the browser, that's true. But it's an app that runs in the browser. Not a web app. It isn't HTML/DOM etc. That could be a plus for some use cases. I know a lot of developers use our web port to build apps. Hell, one customer even targets IE 6 which would be a nightmare with React/Vue et al but with Codename One it mostly works because we don't need the DOM.

There are a lot of downsides though. Plugins and tools that rely on DOM/HTML start failing. Password managers etc. are hard to work with. We have workarounds for those but it's a hassle.

Thread Thread
aadityasiva profile image
Aadityasiva

A web app with flutter is not equivalent to one made with JS. The flutter team themself say

Not every HTML scenario is ideally suited for Flutter at this time. For example, text-rich, flow-based, static content such as blog articles benefit from the document-centric model that the web is built around, rather than the app-centric services that a UI framework like Flutter can deliver. However, you can use Flutter to embed interactive experiences into these websites.

But if you expect most of your users to use the mobile app made with flutter then flutter for web is not a bad choice

Thread Thread
codenameone profile image
Shai Almog

Sometimes a web app is just a mobile app placed in the web. This way it can circumvent store restrictions etc. If that's what you want then flutter web will work for you.

Sometimes the web app is something a bit different. It might include some of the functionality of the mobile app but it might also be your marketing website. In this case flutter sucks. SEO and related tooling just won't work with flutter. Maintenance would be painful since the web site and the app would have differences and different paces of update.

You won't be able to reuse all the amazing tools available for doing stuff on the web. It isn't a website, it's an app that runs on the web.

Collapse
christiankozalla profile image
Christian Kozalla

For what reasons is OOP "on its own not a good thing"? The statement itself seems to be highly prejudiced.

Note: I am not affiliated with OOP whatsoever.

Collapse
christiankozalla profile image
Christian Kozalla

Questions that come to my mind:

  1. How can a technology be simply "better" than another?
  2. Why compare only Flutter and React Native? What about Ionic for example?
  3. Is the outcome of this discussion going to have an impact on the title of the article that you are writing (i.e. you seem to be sure that Flutter IS better, but it seems you are seeking points in favor of Flutter..)
  4. I have not used either Flutter or React Native, but I am starting with Ionic. It is the best tool for me, because I can leverage my existing skills in web technologies (HTML, CSS, JS) without having to learn a new language and still have three outputs (web app, native android app, native iOS app) with one single codebase at the end of the day
  5. Here is an article from the developers of ionic comparing Ionic to Flutter ionic.io/resources/articles/ionic-...
  6. Why is OOP on its own not a good thing?
Collapse
mirhsquadri profile image
mirhsquadri Author

Thanks for sharing the resources on ionic. Will definitely look that up. There is a question that is being asked in the developer community a lot these days and that is, "Should I learn Flutter? Is it the next big thing?". I don't have my mind made up in anyway, nor is the article biased towards one angle. But the title of this article is meant for getting a debate going, so that I can learn from multiple differing perspectives the benefits/drawbacks of flutter, all of which will be accounted for in the article. As for technology being "better" than the other, my focus is to cross compare these technologies and see if overall Flutter offers a superior framework than the others. This in my mind is possible. For the whole OOP thing, I don't want to step on any shoes, but I personally hate OOP. It's an old, clunky way of doing things which if anything slows down the process. Now I know that a case can be made for encapsulation and polymorphism etc. But all of that can be implemented in other forms as well without binding your code to the stringent restrictions of OOP.

Collapse
christiankozalla profile image
Christian Kozalla

Thank you for your detailed answer.

I believe that comparison of such tools heavily depends on the context, use-case and related factors. For example, I believe, the preference and prior experience of the developer(s) play a crucial role when deciding which tool to choose.

Additionally, I notice that people are heavily fighting and advocating for the tools they use. Like comparing Vue, React and Angular... These are tools to develop single-page applications. If someone says, this one's better, it's mostly about personal preference.

For example, React is the most popular UI library for building SPAs. It's so popular, people are building things, for which React is not suited - like static sites. There are better tools for building static sites. So the question which is better might be misleading..

Concerning OOP, I also notice that it is not popular (among the JS community), though JS supports OOP. I am not very skilled in OOP, but that's not the point. In many languages like C++, Java, PHP object-oriented programming really shines. It's the bread and butter for many devs.

Thread Thread
mirhsquadri profile image
mirhsquadri Author

You make a really good point about how some technologies can get so overhyped that they start using it for things it was never meant to be used for. I kind of feel that way about Python too. Though it is a multipurpose language, I just feel like it is not the most optimal for web development and/or desktop applications. However, I see many web devs use frameworks like Django to make complex web applications. I guess it boils down to personal preferences like you said.

I actually have used OOP quite a bit. I started my career as a PHP developer and OOP was used in majority of the projects. However, as I slowly started to broaden my horizons with JS frameworks and even Python for web development, I began to see how tedious and ultimately unrewarding it was to implement OOP. Plus with the advent of JS frameworks, it's harder and harder to find devs to work in your team who are experienced with OOP. Most devs have a conceptual understanding of it.

Thread Thread
christiankozalla profile image
Christian Kozalla

What you say sounds reasonable to me =)

Your proposed title has sparked some healthy discussions, it seems.
Good luck with the article 👍

Thread Thread
mirhsquadri profile image
mirhsquadri Author

Thanks for sharing your insights. It certainly helps. I will share the article once published with the Dev community.

Collapse
jupyter1186 profile image
Ahmad Rehan

Yes and no. I am pretty new to the mobile side but so far according to my research, i think both have their ups and downs. So it really boils down to the type of app which is being developed. React mative is mature and has a very solid community with lots of content online for those who need to search up on something. Whereas for flutter, its pretty new on the block, plus it got a load of bugs if you check up on their github repo. Though it gets a point for having a more powerful engine (dart's engine, written in C++), so much better performance. So my opinion here is, it boils down to preference and as i previously mentioned, the type of application. If the application requires low level APIs to operate, then it is preferably even better going down the swift/kotlin route than picking these two as it can be pretty limited.

As for me (using react for frontend) Its alright staying on react native, though its not much of a learning curve going down the flutter route, but development on two similar frameworks is much handy (as a lotta code can be copy pasted from web to react) and react has a lot of support and some best practices that can be followed while writing code. Which helps in efficiently getting the job done.

But pretty much i am neutral here.

So anyway, hope i was able to help you with your magazine. 👋

Collapse
mirhsquadri profile image
mirhsquadri Author

Thanks a lot for your detailed reply. I learnt quite a few things from it. For starters, I didn't know Dart was built on C++. So that is a great advantage right there. Say you wanted to build an app like Udemy or Kindle, which would you prefer using? React Native or Flutter?

Also, what are your thoughts on flutter for web development?

Collapse
jupyter1186 profile image
Ahmad Rehan

For that level id say kotlin / swift, because first off that would be a very big platform and i definitely care about my users having those quick, responsive and the smooth experiences. Plus i dont want to have potential worry about not having access to low level APIs in case i want to expand the system in the future. But for apps smaller than those businesses, it definitely stick with the most efficient solution

As for the your second Q, flutter for web really got me pumped wehn i saw it was coming out soon, but then i started to dig around and took a step back. Its good but frameworks like Vue and NextJS dominate the web domain, but if flutter provides some sick way of doing something better than those, im gonna pick it up.

So my overview, flutter is basically that hyped up over-promised, under-delivered product. Gooe definitely could have done better. But they did it ok. What i mean is, flutter is in its early / infant stage. Id wait for it to mature a bit and become more stable before i use it for my next project. Hope my reply helps :)

Collapse
pablonax profile image
Pablo Discobar • Edited

The main difference is performance. Applications developed on Flutter are much faster than using React Native. Unlike React Native, which works with bridges and JavaScript, Flutter allows you to solve application tasks faster, especially those related to the user interface. And in Flutter, the app is faster to launch. But the main disadvantage of Flutter is that it is a young platform and it has few ready-made solutions. Good templates are hard to find, but in my article there is a selection where I compare free and paid templates - dev.to/pablonax/free-vs-paid-flutt...

Collapse
mirhsquadri profile image
mirhsquadri Author

Thanks for sharing the resource.