score:6

ReactNative is a set of real native Components like View, TextInput TouchableHighlight and more. It is also a platform which let you run javascript code to control these.

There is no WebView like in Cordova, what you get is a native App with native views.

But that means, that you can still have some or your domain logic written in JS which you can use the same way in your Web App.

For example you have a Login Screen for iOS, but all the necessary stuff for your server calls, can go into a separate module e.g. api/auth.js, which is shareable between web, ios, android, iot.. what ever.

score:11

It's good that you plan in advance. 100% matching between JS and Native won't be possible, but with careful planning, you could get to reuse a good deal.

You may want to take a look at React Native Web project that mirrors Native-specific components for Web (e.g. View, Image, Text, etc).

I suggest building a simple prototype in React JS and then in React Native so you get some understanding of the differences in the two ecosystems. Having a hands on experience will prove more beneficial than any writeup :)


Related Query

More Query from same tag