Pablo Barría Urenda
Pablo Barría Urenda

Reputation: 5813

Recomended way to create React-Native-for-Web app?

I want to create a React web app that may or may not become a native app, and for that I'd like to develop it using React Native for Web. However, I'm not sure what is the best course of action, to keep the native targets a realistic possibility:

Upvotes: 4

Views: 3656

Answers (2)

orYoffe
orYoffe

Reputation: 71

Another option is to use create-react-native-web-app https://www.npmjs.com/package/create-react-native-web-app

$ npm i -g create-react-native-web-app
$ create-react-native-web-app myApp
$ cd myApp
$ npm run web

Upvotes: 4

ReyHaynes
ReyHaynes

Reputation: 3092

I've been researching this process for the past week. Here are some options I found that might work for you.

Option 1

There is the react-native-web module which basically allows you to simply code in react-native with web polyfills.

Repo here: https://github.com/necolas/react-native-web

Option 2

There's also a template called re-start you can use which can set you up with a startpoint that will allow you to code in react-native and build Android, iOS, Web, Windows[UWP] and Electron[macOS, Ubuntu, Windows] apps. Repo here: https://github.com/react-everywhere/re-start

Option 3

If you don't want to use the polyfill option, I actually am working on a build that just simply merges react-native and create-react-app but you have to separate the logic between the 2 platforms yourself.

Repo here: https://github.com/ReyHaynes/react-redux-web-native

Upvotes: 3

Related Questions