Recorded – watch the full episode on YouTube.
Folks coming to the platform and thinking, “do I choose React? Do I choose SwiftUI? Do I choose Flutter?" How do those things really compare in your eyes, and which would you recommend the most?
Meng To: So Flutter is an interesting case. A lot of people are very, very excited about Flutter right now. And I can see two scenarios. I know, of course this is just my opinion. One thing is that people are tired of React Native at the moment because of the shortcomings of React Native.
As someone who has taught two courses about React Native, I can say that it does a lot of basic things well, just like the web. I love the web, don't get me wrong. But when I code, when I design on the web, I definitely don't feel the same freedom as I have for SwiftUI or for UIKit in term of animations, in term of all the things that you can do, all the technologies you can do. It's great for a visual website, right?
“In SwiftUI, you can create these animation states and you can put views on top of another view using a
ZStack, you can hide them, you can use a condition, it's amazingly easy.”
Like, you'll go here, you scroll down, you click here, that's it. But when you comes to the phone, right? You have access to the camera, to the location, to all of these things, the sound, all of these things are very standard. And not just that, but also the animation on the web, try to create a website, that transition from every screen to another. You're not going to see, 99% of website are not going to do that because it's too complex to do it.
But on SwiftUI or UIKit, you're going to see a lot of that. There's a navigation view, which does that by default anyways, but in SwiftUI, you can create these animation states and you can put views on top of another view using a
ZStack, you can hide them, you can use a condition, it's amazingly easy.
So my thinking is that, I think React Native is saying, “hey, we can make cross platform apps, but we're going to use the limitations of the web. Or at least we're not going to be able to do as much as you can, at least layout wise.”
I'm not saying you cannot do all of those technologies, but it feels like there's a middle man or a middle person that's trying to translate everything that you do in React Native to make it work natively. And the thing is, it's also made by Facebook, which means that it might not have the same access as if it was made by Google for Android or Apple and Flutter was made by Google, so I think that's interesting. It feels more native in term of the way you develop apps. And there's a lot, there are far more resources.
“React is amazing. But at the same time, we all know that React relies on so many third-party libraries, right? There are so many things you have to download that you have to depend on in order to create something meaningful.”
One thing as a React developer, is that React is amazing. But at the same time, we all know that React relies on so many third party libraries, right? There are so many things you have to download that you have to depend on in order to create something meaningful. And React Native is not very different from that.
And by the way, I'm not saying this to tell on React Native, right? Don't get me wrong. I'm just saying this to have a fair opinion as much as I can, to speak on the strength of each. I can say constraints in UIKit suck, right? But Flutter, if you look at it, they have so many components readily available for you.
They have animated their own animation library, you don't have to download a lot of third party stuff. And I think that's why people are so excited about Flutter, but as someone who has looked into Flutter a little bit, I can say that Flutter is a notch less simple than SwiftUI. And again, this is based on my limited experience, but I encourage everyone to try both, right? Try Flutter and look at the code.
All I can say is that from a designer perspective, I look at this Flutter code and I look at SwiftUI code, I feel like the SwiftUI code is way more readable, easier to approach, there's a lot of weird things that I try to wrap my mind around, like scaffold and they have so many components on top of each component.
“As someone who has looked into Flutter a little bit, I can say that Flutter is a notch less simple than SwiftUI. And again, this is based on my limited experience, but I encourage everyone to try both.”
It's like when I read Flutter code, especially the template that they give is like me going to the app delegate in SwiftUI first and try to read that before getting the content view. And I guess that's my feelings right now, and I'm not saying it's not going to change, but this is how I feel right now.
Paul Hudson: I think it's really important that we have these options out there. Just like if you want to write a macOS app, you can choose AppKit, which is awesome, you can choose Catalyst, which is very, very good. And SwiftUI too which is up and coming.
You can choose which one makes the best choice for you, the best option for you. And of course you could choose Electron if you don't mind burning through some Ram. But having React Native or having Flutter, having now SwiftUI, I hope we can get ideas from them, more ideas. Obviously we have stacks already inspired by React, but look at these things and steal ideas, it's what great artists do – we steal ideas, and they will have their own pros and cons.
As for React Native, I think it's a bit of a misnomer. Yes, it does native rendering, but it doesn't necessarily mean native controls. They'll do their own drawing of certain things because they can – it's custom buttons or custom navigation or whatever, so it can be cross-platform as opposed to using the native built-in iOS tools.
“Some of us support apps for years and years and years, we want code that works reliably for a very, very long time that we can rely on.”
And of course, Flutter, as you said, is made by Google, so a lot of folks are out there thinking, “Well, I've seen https://killedbygoogle.com. I don't fancy backing that horse quite frankly.” They’ve just seen too many times in the past where big things have come from Google and they've been brilliant and then they've disappeared in a year, or 18 months, or two years, because that team has moved on to other things, or this was a one-off, the money wasn't there, whatever it is changed, the use case changed and Google got bored it and killed it.
And if you are a small company who can pivot around freely and change your mind as much as you want to, fine. But some of us support apps for years and years and years, we want code that works reliably for a very, very long time that we can rely on. And that investment in our learning lasts a long time as well, we can say, “yeah, learn this thing that will last me a long time.” I don't get that feeling from Flutter, at least not at this time.
Meng To: I might have a different opinion. And I guess I have a unique perspective in the sense that we get a lot of feedback from different platforms, right? I know a lot of folks out there are focused on one platform. So for me, I do get a lot of feedback. I teach all different courses, all different platforms, all different design tools. I don't have a preference on one. I just look for the best ideas. I don't think Flutter is going to go away. Looking at the excitement, looking at what people are creating with Flutter, looking at the amount of updates that Google puts out there for Flutter. It feels like one that is ready to stay.
“I’m so used to this idea that Apple is going to blow me away at some point. And that level of trust that I have on Apple is not something that I can compare to any other company.”
That being said, I've always been a huge fan of Apple and I'm extremely biased, but at the same time, I'm okay with that, right? I just love to be able to buy some AirPods, spending $200 on this and say, “I don't need to think twice about it. I'm happy with this decision.” And then being completely blown away after purchasing it. And I'm so used to this idea that Apple is going to blow me away at some point. And that level of trust that I have on Apple is not something that I can compare to any other company.
And so when I say, “okay, well, SwiftUI's awesome.” Also, in the back of my mind I know that Apple is going to keep doing awesome stuff with it. And they have proven that with all the technologies that they have put out there, all of their products. So if I was putting money on the table, I would definitely bet on SwiftUI. Again, I'm biased, but that's not to say that Flutter is not a strong contender. I'm really, really happy that people are trying to go more towards the native route.
“React Native is like the second step and now Flutter is like the third step. But UIKit and SwiftUI have always been the ultimate tools for me.”
I don't know what the difference is between native and non-native anymore, just because there's a lot of little glitches, when it comes to React Native, for example, but it's definitely not in the days of Cordova and all of those platforms, the web-based platforms, at least we got that out of the way. React Native is like the second step and now Flutter is like the third step. But UIKit and SwiftUI have always been the ultimate tools for me.
This transcript was recorded as part of Swiftly Speaking. You can watch the full original episode on YouTube, or subscribe to the audio version on Apple Podcasts.
SPONSORED Join a FREE crash course for iOS devs who want to become complete senior developers — from October 18th to 24th. Learn how to apply iOS app architecture patterns through a series of lectures and practical coding sessions.
Link copied to your pasteboard.