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


当前回答

React是一个声明性的、高效的、灵活的JavaScript库,用于构建用户界面。你的组件告诉React你想要呈现什么——然后当你的数据发生变化时,React会有效地更新并呈现正确的组件。这里,ShoppingList是一个React组件类,或者React组件类型。

React Native应用程序是真正的移动应用程序。使用React Native,你不需要构建“移动web应用程序”、“HTML5应用程序”或“混合应用程序”。你构建了一个真正的移动应用,它与使用Objective-C或Java构建的应用没有什么区别。React Native使用与常规iOS和Android应用相同的基本UI构建块。

更多信息

其他回答

区别很简单。

我们使用React开发web应用程序,使用React Native开发移动应用程序。

React更专注于改进UI(用户界面),而RN则为所有操作系统共享一个公共逻辑层。这为现在已经处理了很长一段时间的问题提供了解决方案,例如开发效率低、部署时间较慢和开发人员生产力较低。

需要注意的是,React是一个用于web开发的库,而React Native是一个平台。

另一件有趣的事情是,当您想要使用RN时,您拥有启动项目所需的一切。另一方面,用React创建一个新项目意味着你只选择了构建web应用程序所需的众多库中的一个。

你可以在那篇文章中找到更多有用的信息: https://pagepro.co/blog/react-native-faq-all-you-need-to-know

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

(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!


希望我帮到你了:)

React Js是一个前端javascript库,它是一个很大的库,而不是一个框架

它遵循有助于构建的基于组件的方法 可重用的UI组件 它用于开发复杂的交互式web和移动UI 尽管它在2015年才开源,但它拥有最大的社区之一支持它。

ReactNative是一个开源的移动应用程序框架。

React本质上是Facebook自己开发的。它实际上是在2013年进入科技界的。React是一个JS库,不是一个框架。React最值得注意的一点是它能够创建前端和后端。

React NATIVE只是一个移动开发平台。在使用React native之前,你需要知道Android的Java或iPhone和iPad的Objective-C来创建原生React应用程序。简单地说,React是Webdev技术,React- native是移动开发技术。

React Native是一个JavaScript框架,它提供了编写多平台应用程序(如iOS或Android)所需的一切。

ReactJS是一个JavaScript库,用于构建web界面和构建您的网站。