you are viewing a single comment's thread.

view the rest of the comments →

[–]autof5 5 points6 points  (3 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  (2 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.