Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What Stack for mobile/desktop cross-platform native development in 2021?
6 points by MrWiffles 3 months ago | hide | past | favorite | 6 comments
If I want to build a cross-platform native app for desktop and mobile devices these days, targeting Android, iOS, MacOS, Windows and Linux, is there a known "good" stack out there that works well, is pretty smooth and easy to get started with? I'm primarily familiar with Go and Ruby for server-side development, as well as front-end HTML/CSS/JS, but I don't want to build an electron app since the overall experience for the end user can be sub-optimal there. I'm not really a fan of C and its derivatives for various reasons, so I'd prefer to avoid that if possible.

I've read that you "can" build apps this way with .NET and Xamarin, but I haven't seen any good beginner-level content for that stack anywhere that's relatively up-to-date, shows how it actually works when building for the various different platforms, and I'm not entirely clear on whether you'd have to buy a microsoft visual studio license to do that or not. Plus, I'm building on MacOS and would like to release the code as open source for the project (I want to build a series of offline, no-subscription music players that sync over your local home network.)

I've heard of using Qt for this, but I can't find any information about how to use it in a non-licensed way (I'm not paying them for a software license for something I'm going to open source anyway). Plus it looks like the language bindings are only available for C, which I'd like to avoid if possible, given the relatively steep learning curve and the fact that I haven't touched C in ~20 something years...

React Native would be a good place to start, but as far as I can tell there's no way to use that for building a desktop application, which is absolutely not optional for this endeavor.

I'm aware that we're talking very different build targets, design languages and such here, but it just seems ridiculous that in 2021 we don't have this yet, which makes me wonder: what am I missing?




React Native is your best bet.

Examples:

- https://github.com/devhubapp/devhub

- https://github.com/mmazzarolo/react-native-universal-monorep...

RN desktop support is weak. But your mobile apps will work quite differently to your desktop apps anyway. And you probably want something that can run on the web too. So for desktop you just put your web app in Electron.

The difference between mobile and web will mean having to implement different routing and components, but you can share a lot of code.

Flutter is the new kid on the block.


If you think long term, the safest choice today is still web.

Yes Electron is not perfect but you can decide to ignore the market of anti web users complaining about Electron running slowly. They are not that many outside IT social networks and rarely your customers. The alternative to an Electron app is often no app, especially on Linux. And the performances and the user experience is totally fine on recent hardware. In a few years, all users will have hardware powerful enough to run Electron smoothly in my opinion.


Despite the Electron detractors, I do think it's a pretty powerful tool. In a lot of cases it's very un-optimized/bloated, but it has been proven to be very quick in some cases (vscode, etc).

In any case, even if Electron falls out of favor or doesn't continue improving - other's will take it's place. I believe "web on the desktop" is not going away any time soon.


I like Flutter, it works for mobile, web and desktop.


With react native you can create windows and macos native application. I never try the API but they are there.


Flutter. don't use anything else.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: