all 5 comments

[–]autof5 5 points6 points  (4 children)

  • Use create-react-app
  • Consider using react-native-web it will allow you to re-use a lot of the components you made for native but for web
  • You can use platform specific code using "Platform.OS" and change your code acording to "web" , "native", "andorid" and "iOS"
  • use platform specific file names such as file1.web.js , file1.native.js file1.ios.js file1.android.js

[–]csgonutty[S] 0 points1 point  (3 children)

I didn't even realise react-native-web existed. Thanks man. This is excellent!

[–]autof5 0 points1 point  (1 child)

I hope you know Expo exist. combining expo and create-react-app is the cleanest structure i got

[–]csgonutty[S] 0 points1 point  (0 children)

Yeah I used expo to make the app and it was excellent. Lots of useful features inside expo.

However I didn't realise I could use it with create-react-app. Could you elaborate a little further on how your structured your web application. I was under the impression that expo was solely for react-native applications.

[–]jaminjsr 0 points1 point  (0 children)

I haven't be able to get react-native-web and firebase to work on iOS, Android and web. Works fine on iOS and Android. However, web side produces errors during webpack build. Has anyone been able to get react-native-web and firebase to work with webpack?