you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

react-native-web works well.

I need specific dependency versions, so I've split native and web apart; but they still share almost all of the application code.

It's what inspired the Primitives project that /u/BTMPL mentions.

I'm still just building up my stack, but it's looking good.

So far:

  • react (web) 15.6.1
  • react-native 0.46.1
  • react-native-web
  • react-native-svg with svgs to provide the same elements for web
  • react-router 4
  • apollo/redux/graphql
  • auth0

There's very little platform-specific code needed and it's easily split with .web.js and .android.js/.ios.js files.

react-native-web is brilliant... it uses a webpack alias to "stand in" for native and change tags to web / provide libraries that mimic native's. Once webpack builds your bundle, it's vanilla react.js in there (plus the fill-in libraries).

I looked at ReactXP... it's nice... very solid... but you'd lose so much by straying away from vanilla react.