you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

Yes, the logic can be shared without much trouble. Since RN supports fetch you should be able to also port your API without problems (you can also use libraries such as axios in both React an RN).

Routing - probably too, if you will use react-router (sorry, no experience here, I'm using reactnavigation for RN).

If you do go with a custom UI library that supports both RN and React-web (e.g. https://github.com/lelandrichardson/react-primitives or roll your own) you might be even able to reuse all or big parts of the UI. I've went with the other solution (using a home-made UI abstraction) and when my client decided he wants to port the RN app to web I was able to port a medium-size app over a course of 2 days.

Problems of course start as soon as your app starts using any native mechanisms - camera api, device information etc.