6 ms·
Does it have any advantages over React Native?
by brainyz 9y ago
Does it have any advantages over React Native?
- lenkite 9y agoAOT compiled to native code that uses the native instruction set - no interpreter/vm involved. Uses custom rendering engine based on Skia. Can write UX just once for all platforms if you don't mind fixing the widget set. Custom widgets work on all supported platforms. Can in theory be ported to Desktops also, assuming someone writes flutter engine bindings for Win/MacOS/Linux. If this occurs, then you will truly have a modern, cross-XP, write-once-run-anywhere, compile-to-pure-binary, reactive UX framework
- cwyers 9y agoWhat "theory" keeps React Native from being ported to desktops?
- lenkite 9y agoReact Native is already ported to desktops but you need to write N times for N platforms. In flutter, you can write just once after choosing a widget set, assuming you don't mind the same widgets everywhere.
- cwyers 9y agoSo it's like Xamarin -- there's UI for iOS, UI for Windows, UI for Android, but you can also use "Xamarin Forms" and have a similar appearance everywhere. But there's nothing stopping there from being a "React Forms" or whatever that does the same thing, is there?
- pknopf 9y ago> being a "React Forms" or whatever that does the same thing, is there? Nothing stopping it, nope. I'm surprised there isn't something currently. That said, it isn't so bad using different render functions for different platforms. The state management and event handling should be 100% consistent. Besides, going all in on a single render engine limits you to creating special "holes" to utilize controls native to the platform. Im not sure if flutter supports this, but I doubt it.
- cwyers 9y agoSure. It just seems odd to list "Flutter could do X" as a benefit if React could do it, too. Yes, React doesn't do it yet, but it also could.
- piaste 9y ago> Nothing stopping it, nope. I'm surprised there isn't something currently. There is - ironically, by the owners of Xamarin: https://microsoft.github.io/reactxp/ https://microsoft.github.io/reactxp/ Hadn't heard of it practically at all since the initial announcement. It seems it's a very small team: https://github.com/Microsoft/reactxp/pulse https://github.com/Microsoft/reactxp/pulse
- jrs95 9y agoFlutter has MUCH better performance than Xamarin Forms though. React could theoretically have something just as good for a cross platform UI toolkit, but given that Flutter took several years to even get to a beta, I think that would probably be a long and expensive project for Facebook and they're likely just not interested in it. That sort of thing sort of runs against the core philosophy of React Native anyways.
- newdayrising 9y agoDo you have a Xamarin vs Flutter benchmark you'd like to share?
- jrs95 9y agoUnfortunately no, this was purely anecdotal based on my experiences using sample/demo applications.
- markdog12 9y agoLooks like work has already started on Desktop: https://github.com/google/flutter-desktop-embedding/tree/master/macos https://github.com/google/flutter-desktop-embedding/tree/mas...
- Harimwakairi 9y agoThere's a few. - Flutter renders the UI itself rather than using native components, so you get the same experience on both iOS and Android. - Flutter uses Dart, which can be compiled AOT, rather than relying on an interpreter. - Flutter is completely open source, tools, engine, all of it. You can go a long way down before hitting iOS platform code, for example, that you don't have source access for. There others, but those are the biggies for me.
- wwwigham 9y ago> -Flutter renders the UI itself rather than using native components, so you get the same experience on both iOS and Android. I thought this was an antipattern in modern mobile device Dev, since you're supposed to make your app "look and feel native" by always using native widgets where possible (and was a major argument for why, eg. Cordova was inferior to react native). Has the collective agreement turned on this, or it is simply contentious?
- mixmastamyk 9y agoPendulum swings. Similar to QT vs wxWidgets.
- solarkraft 9y agoI think it is changing. My personal opinion has definitely shifted, maybe partly because I'm tired of inferior Android experiences of the same app, but also because the looks of Android and iOS seem to be converging anyway. While maybe they couldn't before, many apps seemingly can now get away with one UX for both platforms - that is a strong simplifier and gives a potential branding advantage. It may be a good idea to still implement some "platform sensitive" widgets (some behaviors are still slightly different), but the demand for them seems to have drastically gone down.
- brentjanderson 9y agoThey seem similar in intent and application, however Flutter skips the Javascript-to-native bridge and instead appears to compile to native code for the targeted platform directly, making it faster. In practice, React Native still _feels_ native because it is native and most devices are fast enough for most applications, but the Javascript that operates the native components has a performance penalty due to the bridge between javascript and native. Dart still has a huge hill to climb for mindshare. The staggering amount of community and documentation around react makes it difficult to carve out a competing solution without the same size of community to write documentation, examples, and answer questions on Stack Overflow.
- solarkraft 9y ago> React Native still _feels_ native because it is native A lot of React Native isn't "Native", but that term is hard to define. They certainly display plaform-own widgets, but afaik they use their own layout functions and such.
- akerro 9y ago> Does it have any advantages over React Native? It's not JavaScript.
- s73v3r_ 9y agoIt doesn't use JavaScript or the JS ecosystem.