我已经开始学习React出于好奇,想知道React和React Native之间的区别-虽然不能找到一个满意的答案使用谷歌。React和React Native似乎有相同的格式。它们的语法完全不同吗?


当前回答

React-Native是一个框架,其中ReactJS是一个javascript库,可以用于您的网站。

React-native提供了默认的核心组件(图像,文本),其中React提供了一堆组件并使它们协同工作。

其他回答

React Native是一个使用React构建android和ios应用程序的框架。React是一个用于构建优秀网站的web框架。

React是React Native和React DOM的基本抽象,所以如果你要使用React Native,你还需要React…与web相同,但不是React Native,你将需要React DOM。

由于React是基本抽象,一般语法和工作流是相同的,但你将使用的组件是非常不同的,因此你需要学习这些差异,这是内联React,所谓的moto,即“一次学习,随处编写”,因为如果你知道React(基本抽象),你可以简单地学习平台之间的差异,而不学习另一种编程语言,语法和工作流。

总结:React.js用于Web开发,而React-Native用于移动应用程序开发

我们无法准确地比较它们。用例中存在差异。

(2018更新)


反应

React的主要关注点是Web开发。

React’s virtual DOM is faster than the conventional full refresh model, since the virtual DOM refreshes only parts of the page. You can reuse code components in React, saving you a lot of time. (You can in React Native too.) As a business: The rendering of your pages completely, from the server to the browser will improve the SEO of your web app. It improves the debugging speed making your developer’s life easier. You can use hybrid mobile app development, like Cordova or Ionic, to build mobile apps with React, but is more efficiently building mobile apps with React Native from many points.


反应本地

React的扩展,针对移动开发。

Its main focus is all about Mobile User Interfaces. iOS & Android are covered. Reusable React Native UI components & modules allow hybrid apps to render natively. No need to overhaul your old app. All you have to do is add React Native UI components into your existing app’s code, without having to rewrite. Doesn't use HTML to render the app. Provides alternative components that work in a similar way, so it wouldn't be hard to understand them. Because your code doesn’t get rendered in an HTML page, this also means you won’t be able to reuse any libraries you previously used with React that renders any kind of HTML, SVG or Canvas. React Native is not made from web elements and can’t be styled in the same way. Goodbye CSS Animations!


希望我帮到你了:)

这是一个混合工具的应用程序开发的操作系统和android。你不需要写两次代码。 它使用本地组件和react。 它还为您提供了访问服务器(firebase)的权限。 如需进一步帮助,请点击以下链接: https://reactnative.dev/ https://nativebase.io/