3 ms·
Why Flutter over React Native can anyone answer this question?
by zerubeus 7y ago
Why Flutter over React Native can anyone answer this question?
- SlowRobotAhead 7y agoIt was easy for me. I know almost no JavaScript. I know C and asm and python. So... looking at the two, guess which one looked better to me? The code for Dart just makes sense. It’s not beholden to JS or XML or HTML or CSS. It just does it’s own thing. If you are heavily invested in JS, I bet there are aspects of Flutter that are still appealing, but if your aren’t invested in JS, I see no reason to get in just for React sake.
- saagarjha 7y ago> I know almost no JavaScript. I know C and asm and python. So... looking at the two, guess which one looked better to me? I fail to see your point; surely Dart was a new language for you as well?
- pdr2020 7y agoI assume he means that in selecting between two languages, with that given lang background, he made a preference choice of Dart. As a counterpoint, we have whole swathes of JS engineering teams building new mobile apps and would select react-native / Typescript (and where possible Expo) over Dart.
- thsowers 7y agoFWIW, and this is just my personal experience, but I find Dart to be very similar to Typescript, and we have JS engineering teams building out new mobile apps in Dart ;)
- footweebole 7y agoAs a JS engineer with experience using react I can say that Flutter/Dart is so much easier from a development perspective then react-native. I've done a little bit of swift development as well and the ease/speed of development is comparable. Maybe react-native is easier if you don't know react but for me it seems to keep only the worst parts of react and forcing you into using a lot of components for ui that I found to be poorly documented.
- pldr2244 7y agoIf you can manage to remain inside the Expo dev-loop, that personally is my preference for ease and first in class DX. I’ll definitely continue to observe Flutter/Dart, but the investment/payoff doesn’t appear large enough yet for our use cases.
- SlowRobotAhead 7y agoNot having to ALSO know JS + XML + HTML + CSS... it looks familiar coming from C. If Flutter apps are two things, Flutter and Dart. Then React Native apps are six things or so.
- gavinray 7y agoThis is a complicated answer that would probably take experience developing real-world applications in both to fully appreciate, but I`ll bite. A few years ago, I was CTO of a small startup and spent a significant portion of a year building out our mobile app in React Native. I have experience building cross-platform mobile apps going all the way back from when Ionic was called Apache PhoneGap and was an entirely different product. In my opinion, React Native is a classic case of follow-the-herd syndrome. This is not to say that React Native is not a viable technology, but simply that it just isn't very good. Let me dive into a few of the things that were really grating when developing on RN: - The hot-reload times were painstakingly slow. I am talking about 15-20 seconds after save. This really takes a toll on development velocity. - You have a major decision to make when building an RN app: To use Expo or not. Expo is an SDK which allows you to circumvent needing to drop down into the native build processes for each platform and provides wrapper APIs for accessing native hardware functionality on the phone, with the tradeoff being that a wide number of RN libraries were not compatible since they required being installed as Cocoa Pods or Gradle/Maven packages natively. So you are trading convenience and development speed for flexibility. We chose to go with Expo, and did not regret it. - Performance is an issue in RN that you need to aggressively optimize against. I remember being aghast that rendering a scrollable list of 300 text items caused so much lag and stuttering it required a full day of manual optimization to calculate viewport area and which cells would be in view to prevent that work from being done by the element on-thread in order to be semi-usable. You have to be really cautious about your render cycles and everything else when building views. - Doing heavy custom styling requires some hacky workarounds since RN wraps the native UI elements and does not expose all of the style API that they provide. Later on, at another company, we ended up building an app with NativeScript + Vue which was a much better experience. NativeScript is essentially React Native, but allows you to use any JS/TS framework (or none at all) and has much better APIs for interacting with the device, and allows you to fully style the underlying device-specific UI element if you really need to. And the performance ran circles around RN. The entire experience was overall miles better. Very few people use NativeScript though, just due to the fact you never hear about it. Ultimately, if I had to give advice, it would be this: Either write a regular PWA web app, so that you can leverage existing web technologies and all the component libraries, and then add native functionalities and publish to the app store using the Capacitor framework that powers Ionic apps. Or just use Flutter. Flutter has the only cross-platform mobile experience that does not feel really hacky to me. It does not try to compile to platform-specific view elements, instead compiling to native ARM code, and tries to maintain 120FPS. You can use the same Flutter codebase to generate mobile, web, and desktop apps. And the whole developer experience is really incredible. Instant stateful hot-reloading, screaming performance. Google put a lot of effort and thought into it, and Flutter is not going anywhere given that it powers all of Fuschias UI.
- zerr 7y agoDart is better than js. You define UI coherently in Dart itself, statically typed.
- pldr2244 7y agoYou talk as though react-native developers don’t have access to an incremental, statically typed JS language that already has huge adoption...
- b0ner_t0ner 7y agoCheck out “Flutter Versus Other Mobile Development Frameworks: A UI And Performance Experiment”: https://blog.codemagic.io/flutter-vs-ios-android-reactnative-xamarin/ https://blog.codemagic.io/flutter-vs-ios-android-reactnative...