Live data from Hacker News

Ask HN: How are you building cross-platform (mobile and browser) apps?

news.ycombinator.com

41–50 of 84 posts

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#41

I use React + React Native for https://www.jqbx.fm . As a 1 man project it seemed like the only sensible way to build mobile (android/iOS) and browser versions. I can share almost all of the code (where applicable) so one can move a lot faster and have a lot less mental overhead. That being said React Native has stability and performance issues that are tricky and can hold up your app for a non-trivial amount of time…

Cool app! I got a little confused as to how to add songs once you're a DJ, but the whole things looks cool, and you seem to have a nice community already!

Thanks! Please join in :)

Also, thanks for the feedback I actually keep getting similar comments that it's a lot to learn all. I'm currently trying to simplify things. To add a track you just add it to your "queue" by searching and clicking the plus icon, then when it's your turn (your UN is all the way to the left) your track will play for everyone. Assuming you figured it out but just FYI

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#43
post #38
post #35

Create React Native App (CRNA) with Expo. It doesn't get any better than this from a developer experience perspective.

How does it handle Electron apps? I thought playing with EXPO was a limited venture?

I'm currently developing with Expo with plans to expand to Electron (though I haven't written anything for Electron yet, just the React-Native and Expo portion) but my theory is that once you have the core React functionality down (The API endpoints, Reducers and Actions (if using redux), and general component structure) then porting to Electron will be fairly trivial.

React-Native has a lot of cross-over with React for the web. So I'm hoping when the time comes my port will go smoothly.

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#44
post #42
post #35

Create React Native App (CRNA) with Expo. It doesn't get any better than this from a developer experience perspective.

How are you building the applications for the app stores?

https://docs.expo.io/versions/latest/distribution/app-stores

create-react-native-app works by leveraging Expo

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#45

I use React + React Native for https://www.jqbx.fm . As a 1 man project it seemed like the only sensible way to build mobile (android/iOS) and browser versions. I can share almost all of the code (where applicable) so one can move a lot faster and have a lot less mental overhead. That being said React Native has stability and performance issues that are tricky and can hold up your app for a non-trivial amount of time…

Wow that app is exactly what me & my friends have been looking for. They even started hacking together an Android version of this. Looks really well done!

One question: Do you plan on writing a native desktop solution? I'm not a fan of having to keep my browser open just to run a single app.

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#46
post #45

I use React + React Native for https://www.jqbx.fm . As a 1 man project it seemed like the only sensible way to build mobile (android/iOS) and browser versions. I can share almost all of the code (where applicable) so one can move a lot faster and have a lot less mental overhead. That being said React Native has stability and performance issues that are tricky and can hold up your app for a non-trivial amount of time…

Wow that app is exactly what me & my friends have been looking for. They even started hacking together an Android version of this. Looks really well done! One question: Do you plan on writing a native desktop solution? I'm not a fan of having to keep my browser open just to run a single app.

There's a desktop app available for Mac (it's an electron port of the webapp- if anyone's curious). A windows version is coming soon (ETA ~1-2 months).

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#47

I use React + React Native for https://www.jqbx.fm . As a 1 man project it seemed like the only sensible way to build mobile (android/iOS) and browser versions. I can share almost all of the code (where applicable) so one can move a lot faster and have a lot less mental overhead. That being said React Native has stability and performance issues that are tricky and can hold up your app for a non-trivial amount of time…

Looks nice! What are you using for the backend?

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#49

You should consider your target audience and your own resources. For consumer facing apps, I'm not sure an hybrid (cordova / ionic / webview shell) approach is really up to par, as the UX is really challenging to make right and performance will be lacking. That said, a native approach requires twice the codebase and twice the resources (man hours) roughly, so the challenge becomes maintaining feature parity and team…

> or build your own native web view shell and load your web code manually

After a few Cordova and Electron projects I'm going to try this approach in my next project.

I need to support 5 OS (Android, Chrome OS, iOS, macOS, Windows) and having a native UI for each platform is completely out of the question.

I think a web UI is a valid approach. Not only it reduces dev time, but it also adds responsive features not available anywhere else.

This is a great example of a web iOS done right: https://medium.com/missive-app/our-dirty-little-secret-cross...

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#50
My take on this is that React Native works fine for content-dominant (media, text) apps but maybe not for UI interaction-dominant (arcade games, heavy animations, gestures) ones. You share a very similar API (React) and possibly the business logic between web and mobile. Your project could get bogged down by many little details and idiosyncrasies of React Native so a clear scope and discipline is important.

One example is a Bluetooth-enabled iOS/Android app that I made (but did not publish to app stores). I was able to use a RN library for Bluetooth communication and interact with another device (a bathroom scale) in JavaScript. It was one of those "Wow, this is cool!" and "Man, this is pain!" moments. Note that I did not use create-react-native-app/Expo for this.

Another app, also iOS and Android, simply renders the content of my wife's Etsy store, including the pictures (published to both Apple and Google Play stores). It was done using create-react-native-app/Expo. I didn't like the dependence on the Expo site for building app packages. It's free and there for now but I'll have to "eject" the app in the future if the something were to happen to the site. I used an open-source RN components library which does a good job selecting default typefaces and sizes. There were still fiddly bits I had to poke at to make it look decent, but it was alright for something that I whipped up as quickly as I could. The documentation for the component library was not keeping up with the continuous changes React / React Native / the library itself so that was a pain.

Note that it can get a bit confusing keeping track of what you can and cannot do with create-react-native-app/Expo. You might have to scope the app appropriately until you feel ready to "eject" it from Expo and access the more lower-level RN APIs.

On the web side, I find that I can grok the React API more easily than most other SPA libs. So there's natural affinity for me to keep the API complexity down in the projects that I choose to do by preferring the React-* APIs in general.

I agree with @jqbx_jason's comment and RN was the only sensible (sane?) choice in my case for the 1-man projects. Some background: I have professional experience in Java, C#, C, JavaScript/ES6/TypeScript and few others, but no experience doing fully-native iOS and Android apps.

FWIW, Pinterest seems to be liking RN for their mobile apps: https://medium.com/@Pinterest_Engineering/supporting-react-n...

Post reply on HN