9 ms·
Ask HN: React Native or Flutter?
What is your pick, if you are starting mobile app development today?
- latchkey 7y agoI picked Flutter and I'm really happy with it. The latest release of Flutter makes me even happier as there are some nice improvements. I'm using Material components because for me it is the bootstrap of UX these days and requires little thought to make a fairly clean UX. As a developer I can just drop in components as necessary. * Hot reload, on device, works and works well. * Really nice error messages (in latest release). * It is fast. * Dart is pretty nice once you get used to it. * Provider api for state management works great (basically, react context). I also do a lot of react web dev, but given that Flutter targets web (and desktop now... goodbye electron), I might try that in the future once it matures a bit. Some one is developing this kind of cool example of the web target: https://github.com/rxlabz/panache https://github.com/rxlabz/panache
- realusername 7y agoI like Flutter as well, I've tried both react-native and Flutter for some small size side projects. I did not like Flutter at all when I've tried it just after the release but now that it had time to mature a bit, it's an excellent tool. However I don't see why people try to push it on the web, it just renders everything in a canvas, it's a poor fit for web development.
- latchkey 7y agoOh wow, I didn't notice that it went to a canvas! Thanks for pointing that out. Definite consideration for whether or not to do use that in the future.
- lima 7y agoThe theme editor is a nice example where it makes sense.
- realusername 7y agoI don't know if there's a plan to create a DOM render but that's definitely possible the way flutter is done. It's just much more work of course.
- mrpickels 7y agoflutter is based on skia rendering engine and recently they added support for web assembly, it's a matter of time. the thing is, think in terms of capacity and vision, react native is done, flutter will move.
- sophiebits 7y agoReact Native is certainly not done.
- mrpickels 7y agoit doesn't look promising with the latest beef in the community and the last release notes that I saw in this project - to be real, they're laughable in comparison with flutter 1.9 changelog.
- Chyzwar 7y agoThey just introduce the new JavaScript engine just for react-native (hermes.js).
- bsaul 7y ago« fast » isn’t that obvious. The « vegetable » demo app on the app store lags on scrolling on an iphone10.
- mrpickels 7y agobecause your phone is not vegan
- gitgud 7y agoI like flutter and enjoy the benefits you've listed. But the Web implementation is terrible (reminds me of flash) and the desktop implementation has major lag on the single button demo, I guess it's still early, but it's probably not going to replace Electron yet...
- sjroot 7y agoWith SwiftUI and Jetpack Compose on the horizon for iOS and Android developers, respectively, you should really invest time into learning those frameworks.
- jdonald 7y agoA relevant read for someone to seriously consider the "Neither!" answer: https://news.ycombinator.com/item?id=20695806 https://news.ycombinator.com/item?id=20695806 "The not so hidden cost of sharing code between iOS and Android" (dropbox.com)
- rapsey 7y agoA whole lot of those problems are C++ related and a consequence of starting this very early and possibly going too far. A lot of companies have had good success with code sharing.
- pjmlp 7y agoPlenty of people already descontructed that post. From the "lack of open source" C++ libraries or how hard it is to find C++ devs (assuming one actually wants to properly pay them).
- crispinb 7y agoI think if you are starting mobile app development, learn the basics of the 2 main native stacks (iOS, Android). Preferably learn one of them well. A couple of years ago I might have suggested web (PWA's) as a third kind of 'native' app, but that route seems to have lost traction. In my experience, you'll be a better x-platform developer if you know at least the basics of the native platforms you're targeting. This is not to say that native is the best choice for all apps. You may find that flutter or React Native suit a particular project best. You may ultimately prefer to specialise in one of those. But that's a separate issue from what you should do starting out.
- pjmlp 7y agoQuite the contrary, what I have seen around here is that what would have been a Cordova/Ionic project, nowadays is usually done as PWA.
- crispinb 7y agoWell it's only an impression I have. I'm not seeing much use of PWAs in the wild, and there seem to be fewer articles touting them, but that's just my sample. If what you say is true, I'd be pleased.
- pjmlp 7y agoEven Microsoft has replaced their JavaScript UWP bindings (WinJS) for PWAs. https://developer.microsoft.com/en-us/windows/pwa https://developer.microsoft.com/en-us/windows/pwa Chrome has added support for PlayStore PWAs (TWA) https://developers.google.com/web/updates/2019/02/using-twa https://developers.google.com/web/updates/2019/02/using-twa And even Apple has improved the support since iOS 12.2.
- crispinb 7y agoThe Microsoft example seems a bit desperate - they bombed in mobile so of course they're seeking cross-platform refuge. But are PWAs being used that much for real? Beyond just installable web sites (ie. full offline support with service workers, etc?). I seem to remember Twitter did a nice job with Twitter Lite, but I've never seen anyone use it. Again from memory I think Skype did a quite impressive PWA. I'm a big fan of Checkvist, & they have a PWA which is moving slowly but in a good direction. Anyway, that aside, for a dev wanting to get into the mobile space (which I think was the OP's intent), PWAs would hardly be the best first option for a tech to learn. Surely whatever your personal tastes, you wouldn't disagree?
- anaisbetts 7y agoMy pick is what's appropriate for the situation - you haven't described yours so it's not really possible to help you! Flutter is imho Generally Better but there are absolutely going to be cases where RN is going to be less fighting against the system
- WA 7y agoAlthough unpopular on HN: Cordova-based apps with a good mobile look-alike framework can get you very far for a smallish app. Advantages: - truly one code base - iOS, Android, and web apps - JavaScript skills are useful - experience is "good enough" for the average user Downsides: - almost no fine-grained control of input controls (like which keyboard to show) - doesn’t respect users’ accessibility options of the OS - small differences between the native widgets and the CSS/HTML lookalikes - not anymore: performance. It’s really good enough on devices of the last 4-5 years I use Ionic, or more specifically: Stencil with ionic web components.
- raihansaputra 7y agoI agree. With good frontend development practices (state management, caching, etc) it behaves a lot like a native app, it's quick to get up and running and easy to maintain. Not to mention you can deploy as PWA/mobile web if it suits the situation. What framework are you using? Angular or another framework? I'm interested to explore this approach using Svelte.
- WA 7y agoI use Stencil, made by the ionic team: https://stenciljs.com/ https://stenciljs.com/ It’s also a compiler for web components like Svelte and a lot like React. You can add the ionic code web components to get animations etc. Try it out, especially if you like TypeScript.
- raihansaputra 7y agoMight have to take a deeper look at it. Thanks!
- pjmlp 7y agoI used them a couple of times, for that kind of user experience I rather use a PWA.
- WA 7y ago
- andrewtbham 7y agoI wrote this article... on the basic differences. https://medium.com/@andrewt3000/flutter-versus-react-native-64ea9204e35f https://medium.com/@andrewt3000/flutter-versus-react-native-... I love react for web development, but... idk. If you're interested in material design and don't mind that your app will look like a google app, I would seriously consider flutter.
- knocte 7y agoXamarin.Forms: the joy of single-codebase for many frontends, plus decent language to code with (F#, C#).
- shanev 7y agoWrote a bit about this: https://beta.trustory.io/claim/1226/argument/3011 https://beta.trustory.io/claim/1226/argument/3011. I would also consider Kotlin Multiplatform.
- Apocryphon 7y ago> The biggest issue with Flutter is that it paints it's own custom UI, and doesn't use native components. Historically, frameworks that took this approach haven't stood the test of time (see Java AWT and Swing) Works in games, with Unity and the like. Not coincidentally, some Flutter users and even devs have been describing Flutter as "Unity for apps."
- pjmlp 7y agoNeither of them. Qt, Xamarin, PWA, C++ with native views would be my picks.
- diminoten 7y agoI swear to God, a feature I'd literally pay to have on HN is a verifiable tag on each username that provides info on how many years and in what domain a person has been working, because some of the shit in these comments is patently absurd. C++ with native views? Seriously?
- enjoiful 7y agoI’m pretty sure they’re joking and it’s a good joke at that. If serious, well then web dev deserves its reputation.
- diminoten 7y agoI hope it's a joke and I'm being too sensitive, I really hope that's the case...
- pjmlp 7y agoFully serious, Office for iOS and Android is done with C++ and native views.
- diminoten 7y agoYeah I heard you, but it's terrible as a decision, and honestly your opinion shouldn't be allowed on HN without huge caveats that you clearly have no relevant experience in mobile development.
- pjmlp 7y agoThe only ones allowed to evaluate how relevant my mobile experience is are my employers and the customers I work for, which contrary to HN, actually have to give me money for what I deliver.
- onion2k 7y agoReact Native. Not because of the framework, because they both work well, but hiring a JS dev is about a billion times easier than hiring a Dart dev so if you need someone to support you later things will go much better.
- reactor 7y agoI dabbled with Dart for sometime, got an impression that a competent Java/C# developer can pick up Dart in no time, I think hiring shouldn't be an issue.
- fastbeef 7y agoA language is pretty easy to pick up if you’re coming a similar class of languages. Ecosystems, tooling and patterns on the other hand...
- petre 7y agoEven a Js dev can pick up Dart quite fast. At least the language is sane compared to Js.
- leerob 7y agoIt's not about how fast they can pick it up. It's about whether they want to or not. And most devs doing JavaScript work want to stay in JS land. Similarly, good luck finding help with Dart issues versus the JavaScript ecosystem.
- onion2k 7y agoThere are a bunch of problems. Firstly, people simply don't apply for jobs that use languages they don't know. That makes filling a role really hard. Secondly, if someone has to learn the language when they join that puts a lag on how quickly they can be useful. You can't go as fast, which is bad if you're a startup. And lastly, companies are (usually) very reluctant to let someone spend the first few months getting up to speed if a technology choice means they can recruit people who'll immediately be effective. That's not to say using a less popular language is a bad idea (it isn't), just that hiring should be a part of the technology decision making process.
- vandu23 7y agoFlutter
- bsaul 7y agoi’m currently asking myself the same question, and i used to like flutter approach. However, after having tried a flutter demo app from the store ( the one comparing vegetables), and seeing it lag on scrolling on an iphone10 , plus seeing that the keyboard placeholder doesn’t follow the keyboard animation ( so you see a white mark behind), i’m seriously reconsidering this option. plus, i feel safer coding my business logic in typescript than dart. It’ll be more useful in case i want to code a web site (flutter web renders to a 2d canvas , which feels wrong for some reason), eventhough dart theorically compiles to js, i feel typescript is more used for that.
- jrempel 7y agoKotlin Native. Native UI, shared logic
- maxharris 7y agoI'm working on a new framework that attempts to take what I think are the best ideas from the web (zero installation, easy to lay things out without tracking measurements yourself) and combines them with the best ideas from React (functions as components, ideally no mutable state). I want to solve what I see as the original sin of the web: inept separation of presentation from content. The other thing I aim to solve is the issue of the browser and corresponding web standards being a monolith so large that only Google and Apple can afford to implement them. By wrestling back control over layout, I hope to show that a next-generation browser could be much more like what James Mickens laid out with the research he presented in this talk: https://www.youtube.com/watch?v=1uflg7LDmzI https://www.youtube.com/watch?v=1uflg7LDmzI I decided to prototype it in JavaScript, and right now it just renders into a canvas element. I love working on it, because all the unit tests run really fast. It can do that because there's no browser in the way - node-canvas is much lighter weight. Once the design is settled down, I'd like to rewrite it in Rust. The other advantage of this is that it is incremental. It'll run in any existing web browser, and building a cut-down browser that isn't web-compatible is doable in a few weekends. The best way to see its capabilities so far is to look at the test screenshots: https://github.com/maxharris9/layout/tree/master/test/screenshots https://github.com/maxharris9/layout/tree/master/test/screen... - see especially text-actual.png, text-concave-cutout-actual.png, text-diamond-actual.png. I fell down a rabbit-hole with that a bit and made it wrap text around arbitrary polygons, hyphenating on syllable breaks and everything. I just lost my job a couple of weeks ago, and I've been taking time off to work more on this thing. Tomorrow I hope to get mouse click events tracked through the component tree. And at some point in a week or two, when that's done, I really should write the application that I had in mind for it! I know a lot of people have concerns about accessibility with the approach I've taken, and all I can say to that is, please help me work on that instead of criticizing me. I know there is talk about an accessibility DOM coming in browsers, but I fear that I'll just have to fall back to rendering plain HTML in order to drive screen readers, which is a terribly inefficient and indirect way of doing things. Also I don't even know where to begin with screen readers, what's the most popular software for that, etc.
- suspectdoubloon 7y agoI built an app in React native a few years ago, at the time it looked more mature than flutter. However I had a lot of issues regarding keyboard placement, I still had to write platform specific code, which wasn't too bad your could use .android.js or .ios.js. Android also felt like a second class target for React native. A lot of the css features wouldn't work. It could be a lot better now, but I haven't tried since. I very much believe it would be easier pursuing a PWA or writing native code for each platform.
- noypi3 7y agoi would pick xamarin. - if not part of the option, maybe react-native. and never flutter, last time i check, flutter allow a numeric value to be null.
- stunt 7y agoYou will get better answers by giving more context. - What are you building? - Do you have short deadline? - Are you building it for yourself or someone else? - How big is your team? - How many devs do you have to hire? - Do you have time and budget for longer on-boarding if your new hires have to learn a technology? - Are you refactoring or replacing an existing software? - Is it just a MVP product? Without context it is just a technology comparison which is somewhat polluted by someone’s experience or may be biased in some communities.
- rvz 7y agoI have seen this question before on HN and I think my previous response seems to be relevant to this and should help the OP. This ultimately depends on your situation. I would have said Flutter since it is past 1.0 and RN is still in beta. But my main problem here is that you will quickly run into difficulty in attempting to use C/C++ libraries in Dart. Dart has beta support for native FFI but it is not stable unlike RN. Right now, they instead have 'Platform Channels' which has a significant overhead when passing messages back and forth compared to a native FFI. The issue is still open on Github: https://github.com/flutter/flutter/issues/7053 https://github.com/flutter/flutter/issues/7053 I can reuse and port my JavaScript/TypeScript projects into mobile very quickly thanks to React Native. Flutter on the other hand, requires learning Dart which depending on your use-case makes sense if it is a new project, not so if you have invested in JavaScript. Perhaps once Dart gains a production-level C/C++ FFI, then I can seriously look at both Dart and Flutter again.
- clumsysmurf 7y ago> The issue is still open on Github: https://github.com/flutter/flutter/issues/7053 https://github.com/flutter/flutter/issues/7053 The last message in that thread mentions dart:ffi is in preview.
- pjmlp 7y agoIt is, and looks like a toy versus what P/Invoke is capable of.
- mrpickels 7y agoit's so.hard(to () => { learn.a.new * language; they.are(all + sooo different) }
- a_imho 7y agohttps://killedbygoogle.com/ https://killedbygoogle.com/
- stephenheron 7y agoWe picked React Native and while it's not without its problems in general we quite like it. The community around it is pretty good and being able to use a wide range of JS/React packages is really handy.
- chrisa 7y agoI love React Native! That said - if you're not familiar with the JS ecosystem (node_modules, etc), then it can seem a bit overwhelming at first, especially when you encounter configuration or build errors. I don't have any great answers for that except that "it gets easier" with more time and practice. Also, if you haven't looked at React Native for a couple of years and had a bad experience before - try it again! It's come a really long way in just a few years. For example: I used to have to worry about cross platform code/libraries working on iOS and not Android - but almost never run into that anymore.
- mrpickels 7y agoif you're a corporate slave then pick react native because it's easier to find a JOB with it. If you're a dinosaur who started his career coding in Delphi then pick Xamarin. If you want to enjoy development and make some side project/startup pick Flutter. If you don't respect yourself or you are funny - C++ + native views, that's a huge ROFL.
- pjmlp 7y agoWhat about the dinosaurs that started using Timex 2068 BASIC and Z80 Assembly?
- mrpickels 7y agothey should be crowned as living deities and go to Valhalla
- Apocryphon 7y agoDelphi is still an option for mobile cross-platform!
- aishna23232323 7y agoWe wrote an article on the exact same topic when we were making this decision ourselves: https://www.mobiledeveloper.net/blog/flutter-or-react-native https://www.mobiledeveloper.net/blog/flutter-or-react-native, to summarize here are the factors that we have considered - User Interface - Flutter works flawlessly with proprietory widgets Development Time - React takes less time Performance - Flutter makes it easy for developers to use the existing code Stability - React is more stable Programming Language - React uses Javascript and Flutter uses Dart At the end of the article, you will be able to pull yourself from this dilemma.
- anon1094 7y agoPurely from an available jobs perspective, I recommend that you go with React / React Native.
- youeseh 7y agoNo mention of Electron? Is it no longer cool?
- karmakaze 7y agoReasons to use Flutter/Dart: * no (or less) native platform quirks/differences * better programming model than Android SDK * good performance Reasons to use React Native: * uses native widgets (if that matters to you) My recommendation, write your portable app using Flutter/Dart. If that's not satisfactory, call that your Android version and write an iOS in Swift. Do not fool yourself into thinking either Flutter or React Native will give you native app performance. It can be as fast but the pauses are in different places and users can definitely feel the difference even if they can't articulate it.
- Harrymon12 7y agoFlutter. It really helps me my daily life. You can do many things at home without going outside. Transactions outside can be done inside the house already.
- puma2004 7y agoEclipse
- ReD_CoDE 7y agoThese days we have the same questions, but with extra ones: Fluter or Native? Which the answer is Fluter never ever can be natives, like JAVA and SWIFT, but is good for must of the startups to start quick PWA or Fluter? We don't know
- skinnyasianboi 7y agoAnother neither answer: Kotlin Multiplatform with Jetpack Compose and SwiftUI. Jetpack Compsoe might even become platform independent in the future.