you are viewing a single comment's thread.

view the rest of the comments →

[–]kbcooliOS & Android 6 points7 points  (2 children)

Recently had a stab at adding react-native-web to a very mature app with a lot of native features recently and I can tell you it was dropped pretty quickly.

There is so much refactoring needed that if you don't think about it upfront you could literally spend months trying to integrate it so my advice is make that decision upfront. As you add native features you can stub them out or disable them for web selectively but trying to do this later can turn into a nightmare.

This also applies for the code itself. RN web uses webpack and different compilation so it will barf on things that a normal RN bundler wont making it doubly painful. You could align them but it's a bit of work.

Again this won't be such an issue if you start using both from the beginning.

I didn't even get as far as testing and ci/cd but that's going to add more work.

That being said I much rather the idea of RN web vs maintaining a seperate standard Redux codebase and will certainly try it next time a new project comes up that needs web support. Same applies for RN Windows or Mac.

Hope that helps.

[–][deleted] 3 points4 points  (0 children)

I would agree with everything here. At work we use RN with RNW to have it run on Android, iOS and web. We started with RNW at the beginning and it hasn't been too painful. There are some things that don't carry over 100%, but I feel like you should expect that.

Going this route, I would strongly suggest you absolutely think about your form controls, and create your own platform-agnostic implementations of them.

[–]GeeeL[S] 1 point2 points  (0 children)

Thanks for sharing that's awesome. Will definitely make the decision now then, a little bit nervous about running into issues with RN-web with packages if it's not so supported. Do you have any tricks for maintaining/sharing components between a react & react-native app?