What is the difference between React Native and React?

后端 未结 30 2367
粉色の甜心
粉色の甜心 2020-11-28 00:22

I have started to learn React out of curiosity and wanted to know the difference between React and React Native - though could not find a satisfactory answer using

相关标签:
30条回答
  • 2020-11-28 00:32

    ReactJS is a core framework, meant to build component isolated based on reactive pattern, you can think of it as the V from MVC, although I would like to state that react does brings a different feel, specially if you are less familiar with reactive concept.

    ReactNative is another layer that is meant to have a set component for Android and iOS platform that are common. So the code looks basically the same as ReactJS because is ReactJS, but it load natively in mobile platforms. You can also bridge more complex and platform relative API with Java/Objective-C/Swift depending on the OS and use it within React.

    0 讨论(0)
  • 2020-11-28 00:35

    ReactJS is a framework for building an hierarchy of UI components. Each component has state and props. Data flows from the top to low-level components via props. The state is updated in the top-level component using event handlers.

    React native uses React framework for building components for mobile apps. React native provides a basic set of components for both iOS and Android platforms. Some of the components in React Native are Navigator, TabBar, Text, TextInput, View, ScrollView. These components use native iOS UIKit and Android UI components internally. React native also allows NativeModules where code written in ObjectiveC for iOS and Java for Android can be used within JavaScript.

    0 讨论(0)
  • 2020-11-28 00:35

    React Native is for mobile applications while React is for websites(front-end). Both are frameworks invented by Facebook. React Native is a cross platform developing framework meaning one could write almost the same code for both IOS and Android and it would work. I personally know much more about React Native so I will leave it at this.

    0 讨论(0)
  • 2020-11-28 00:35

    ReactJS is a javascript library which is used to build web interfaces. You would need a bundler like webpack and try to install modules you would need to build your website.

    React Native is a javascript framework and it comes with everything you need to write multi-platform apps (like iOS or Android). You would need xcode and android studio installed to build and deploy your app.

    Unlike ReactJS, React-Native doesn't use HTML but similar components that you can use accross ios and android to build your app. These components use real native components to build the ios and android apps. Due to this React-Native apps feel real unlike other Hybrid development platforms. Components also increases reusability of your code as you don't need to create same user interface again on ios and android.

    0 讨论(0)
  • 2020-11-28 00:38

    REACT is Javascript library to build large/small interface web application like Facebook.

    REACT NATIVE is Javascript framework to develop native mobile application on Android, IOS, and Windows Phone.

    Both are open sourced by Facebook.

    0 讨论(0)
  • 2020-11-28 00:40

    Some differences are as follows:
    1- React-Native is a framework which used to create Mobile Apps, where ReactJS is a javascript library you can use for your website.
    2- React-Native doesn’t use HTML to render the app while React uses.
    3- React-Native used for developing only Mobile App while React use for website and Mobile.

    0 讨论(0)
提交回复
热议问题