Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-native and React

I'm building a webapp and ios/android (same app). At first I thought cordova may be a good choice then after reading I thought React-native may be a better choice.

My question is: Will I have to write the same app twice (one in react for web and one in reactnative for mobile) ?

I've seen some library that can share react-native component for web but I feel I'm gonna be limited.

What do you think ?

Edit: One more question With react I would use flux (and probably now redux) what should I do to keep my react-native app clean and readable, I mean how should I manage data there ? thanks for your answers already

like image 467
François Richard Avatar asked Jul 17 '16 07:07

François Richard


People also ask

Is React Native the same as React?

React is a JavaScript library of reusable components designed to create skeletons of the apps, whereas React Native is designed to build native mobile apps with reusable components.

Which is better React or React Native?

To put it in simpler terms, React is ideal for building dynamic, high performing, responsive UI for your web interfaces, while React Native is meant to give your mobile apps a truly native feel.

Can React Native BE USED WITH React?

React Native combines the best parts of native development with React, a best-in-class JavaScript library for building user interfaces. Use a little—or a lot. You can use React Native today in your existing Android and iOS projects or you can create a whole new app from scratch.

Why use React Native instead of React?

React Native apps are faster to build, easier to use, offer better quality than Hybrid apps, and are cheaper than Native apps, so all and all, React Native gives you the experience of having a Native app, without having to develop one.


2 Answers

Doing the same thing right now - I am not sharing the code base because the content of web/mobile app is different - I am using web for administration and mobile app for viewing the content.

like image 119
Balkana Avatar answered Oct 06 '22 03:10

Balkana


React native uses the native views UIView, Text etc for display. You can't have the same code base for them. React native uses flex box( it has its own implementation) so that also wont work for web react projects.

The only way is to keep them seperate.Also Web and App would be having different design .

like image 27
Piyush.kapoor Avatar answered Oct 06 '22 05:10

Piyush.kapoor