Hacker News new | ask | show | jobs
by xyby 2334 days ago
Is there a reason that the web is not a target of react native?

It seems somewhat insane to have a cross platform approach and leave out the biggest platform of all, the web.

Or - looking at it the other way round - what approaches are there to take a working pwa website and turn it into an app? What advantages over such an approach can react native bring to the table?

5 comments

The Ionic team recently released React support so you can build a PWA using React and target iOS, Android, web, and electron. Uses Capacitor under the hood for full native access. It’s been getting a lot of usage since the release: https://ionicframework.com/blog/announcing-ionic-react/
Also you can use Capacitor with any PWA-style web application without using any of the rest of the Ionic Framework. https://capacitor.ionicframework.com/

It's currently the best maintained successor to PhoneGap/Cordova.

There has been a large push to support web as a target in react-native by expo.

https://docs.expo.io/versions/latest/

Depending on the complexity of your app - expo is the best place to start with react-native. Their managed workflows allow you to write in 100% javascript w/ a lot of the native libraries already linked an exposed in JS. If you need something they haven't bundled already then you can eject and have a good starting point.

Expo web is still fairly new but they seem to have prioritized it as highly as support for Android and iOS.

It is, and it's even mentioned and linked to in the article.
Maybe you've heard of ReactJS?