加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

React Native

发布时间:2020-12-15 05:16:20 所属栏目:百科 来源:网络整理
导读:Facebook 在 React.js Conf 2015 大会上推出了基于 JavaScript 的开源框架 React Native, React Native 官网 : http://facebook.github.io/react-native/ GitHub 地址 : https://github.com/jikexueyuanwiki/react-native React Native 结合了 Web 应用和

Facebook 在 React.js Conf 2015 大会上推出了基于 JavaScript 的开源框架 React Native,

React Native 官网http://facebook.github.io/react-native/
GitHub 地址https://github.com/jikexueyuanwiki/react-native


React Native 结合了 Web 应用和 Native 应用的优势,可以使用 JavaScript 来开发 iOS 和 Android 原生应用。在 JavaScript 中用 React 抽象操作系统原生的 UI 组件,代替 DOM 元素来渲染等。


React Native 使你能够使用基于 JavaScript 和 React 一致的开发体验在本地平台上构建世界一流的应用程序体验。React Native 把重点放在所有开发人员关心的平台的开发效率上——开发者只需学习一种语言就能轻易为任何平台高效地编写代码。Facebook 在多个应用程序产品中使用了 React Native,并将继续为 React Native 投资。


React Native for Android
Facebook 于 2015 年 9 月 15 日发布了 React Native for Android, 把 Web 和原生平台的 JavaScript 开发技术扩展到了 Google 的流行移动平台--Android。

FackBook公司都用Mac,这是逼我买MacBookPro吗?


React Native的优势和劣势:(非最终结论,可能会更新):


React Native的优势:相对Hybird app或者Webapp:

不用Webview,彻底摆脱了Webview让人不爽的交互和性能问题
有较强的扩展性,这是因为Native端提供的是基本控件,JS可以自由组合使用
可以直接使用Native原生的「牛逼」动画(在FB Group这个app里面,面板滑出带一点果冻弹动,面板基于某个点展开这种动画随处可见,这种动画用Native code来做小菜一碟,但是用Web来做就难上加难)。
相对于Native app:
可以通过更新远端JS,直接更新app,不需要再发新版本推送了,不过这快成为各家大型Native app的标配了…


劣势:

扩展性仍然远远不如web,也远远不如直接写Native code(这个不用废话解释了吧)
从Native到Web,要做很多概念转换,势必造成双方都要妥协。最终web要用一套CSS的阉割版,Native要费劲地把这个阉割版转换成native原生的表达方式(比如iOS的ConstraintoriginCenter等属性),两边都会不爽。



教程
  • 入门
  • 安装 Android 运行环境
  • 教程
  • 辅助功能
  • Native 模块(Android)
  • Native UI 组件(Android)
  • 调试
  • 在设备上运行(Android)
  • 已知 Issues
  • DrawerLayoutAndroid
  • 图像
  • ProgressBarAndroid
  • SwitchAndroid
  • ToolbarAndroid
  • BackAndroid
  • ToastAndroid


开源APP

研究源码也是一个很好的学习方式

  • 官方演示Apphttps://github.com/facebook/react-native/tree/master/Examples

  • ReactNativeRubyChinahttps://github.com/henter/ReactNativeRubyChina

  • HackerNews-React-Nativehttps://github.com/iSimar/HackerNews-React-Native

  • React-Native新闻客户端https://github.com/tabalt/ReactNativeNews

  • newswatch(新闻客户端)https://github.com/bradoyler/newswatch-react-native

  • buyscreen(购买页面)https://github.com/appintheair/react-native-buyscreen

  • V2EX客户端https://github.com/samuel1112/v2er

  • react-native-todohttps://github.com/joemaddalone/react-native-todo

  • react-native-beerhttps://github.com/muratsu/react-native-beer

  • react-native-starshttps://github.com/86/react-native-stars

  • 模仿天猫首页的apphttps://github.com/baofen14787/react-native-demo

  • ReactNativeChesshttps://github.com/csarsam/ReactNativeChess

  • react native 编写的音乐软件https://github.com/Johnqing/miumiu

  • react-native-pokedexhttps://github.com/ababol/react-native-pokedex

  • CNode-React-Nativehttps://github.com/SFantasy/CNode-React-Native

  • 8tracks电台客户端https://github.com/voronianski/EightTracksReactNative

  • React-Native实现的计算器https://github.com/yoxisem544/Calculator-using-React-Native

  • 房产搜索apphttps://github.com/jawee/react-native-PropertyFinder

  • 知乎专栏apphttps://github.com/LeezQ/react-native-zhihu-app

  • ForeignExchangeApphttps://github.com/peralmq/ForeignExchangeApp

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读