React Native 从安装环境到放弃

1.安装Node.js

https://nodejs.org/en/
在上面的网址中下载Nodejs,然后进行安装
一直点击下一步就好了,不做说明。
默认安装目录
Nodejs: /usr/local/bin/node
npm:/usr/local/bin/npm

安装完尝试下输入 node -v 查看下版本确认安装成功。

2.安装React Native

1)确认Node.js已经安装
2)确认Xcode已经安装

在安装React Native前先安装HomeBrew
http://brew.sh/index_zh-cn.html
直接将网址中的命令行复制并在终端中运行即可
HomeBrew安装完成后再终端中使用brew命令安装watchman与flow

:brew install watchman
:brew install flow

完成之后使用npm安装react-native-cil命令行工具

:cnpm install -g react-native-cil

用NVM管理Node.js版本,从github上克隆代码

git clone https://github.com/creationix/nvm

克隆之后就可以只用nvm命令了

//查看远程版本
nvm ls-remote
//查看本机版本
nvm ls

至此环境搭建完毕

3.创建项目

//创建helloWorld
:react-native init hello world
1.png

根究提示去目录打开Xcode
运行之后湖出现一个终端窗口React Package(回头细说)与模拟器


2.png

酱就项目运行成功啦!

然后我们用subline打开index.ios.js就可以写代码了

export default class hello extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          Hello World!
        </Text>
      </View>
    );
  }
}

command+r重载


3.png

结束....

以下转自:http://www.jianshu.com/p/d78696e9db3f
构建 Facebook F8 2016 App / React Native 开发指南http://f8-app.liaohuqiu.net/
React-Native入门指南https://github.com/vczero/react-native-lesson
30天学习React Native教程https://github.com/fangwei716/30-days-of-react-native
React-Native视频教程(部分免费)https://egghead.io/technologies/react
react-native 官方api文档http://facebook.github.io/react-native/docs/getting-started.html
react-native中文文档(极客学院)http://wiki.jikexueyuan.com/project/react-native/
react-native中文文档(react native中文网,人工翻译,官网完全同步)http://react-native.cn/docs/getting-started.html
react-native第一课http://html-js.com/article/2783
深入浅出 React Native:使用 JavaScript 构建原生应用http://zhuanlan.zhihu.com/FrontendMagazine/19996445
React Native通信机制详解http://blog.cnbang.net/tech/2698/
React Native布局篇https://segmentfault.com/a/1190000002658374
React Native 基础练习指北(一)https://segmentfault.com/a/1190000002645929
React Native 基础练习指北(二)https://segmentfault.com/a/1190000002647733
Diary of Building an iOS App with React Nativehttp://herman.asia/building-a-flashcard-app-with-react-native
Use React Native in Existing iOS Apphttp://blog-en.leapoahead.com/post/use-react-native-in-existing-ios-app
React Native For Beginners – The Next Big Thing?https://devdactic.com/react-native-for-beginners/
How To Implement A Tab Bar With React Nativehttps://devdactic.com/react-native-tab-bar/
tcomb-form-native使用视频教程(需翻墙)https://react.rocks/example/tcomb-form-native
React Native分享记录https://segmentfault.com/a/1190000002678782
React Native构建本地视图组件https://www.dobest.me/article/11
react-native-android-lession(安卓系列教程)https://github.com/yipengmu/react-native-android-lession
React Native模块桥接详解https://www.dobest.me/article/14
React Native: 配置和起步http://www.liaohuqiu.net/cn/posts/react-native-1/
React Native: Android 的打包http://www.liaohuqiu.net/cn/posts/react-native-android-package/
ReactNative之原生模块开发并发布——iOS篇http://www.liuchungui.com/blog/2016/05/02/reactnativezhi-yuan-sheng-mo-kuai-kai-fa-bing-fa-bu-iospian/
ReactNative之原生模块开发并发布——android篇http://www.liuchungui.com/blog/2016/05/08/reactnativezhi-yuan-sheng-mo-kuai-kai-fa-bing-fa-bu-androidpian/
react-native的第一课https://github.com/coderyi/blog/blob/master/articles/2016/0122_react-native_first_lesson.md
React-Native专题系列文章http://www.lcode.org/react-native/
React.js
react.js中文文档http://reactjs.cn/
react.js入门教程(gitbook)https://hulufei.gitbooks.io/react-tutorial/content/introduction.html
react.js快速入门教程 - 阮一峰http://www.ruanyifeng.com/blog/2015/03/react.html
react.js视频教程http://react-china.org/t/reactjs/584
ES6
深入浅出ES6(一):ES6是什么http://www.infoq.com/cn/articles/es6-in-depth-an-introduction
深入浅出ES6(二):迭代器和for-of循环http://www.infoq.com/cn/articles/es6-in-depth-iterators-and-the-for-of-loop
深入浅出ES6(三):生成器 Generatorshttp://www.infoq.com/cn/articles/es6-in-depth-generators
深入浅出ES6(四):模板字符串http://www.infoq.com/cn/articles/es6-in-depth-template-string
深入浅出ES6(五):不定参数和默认参数http://www.infoq.com/cn/articles/es6-in-depth-rest-parameters-and-defaults
系列教程
深入浅出React(一):React的设计哲学 - 简单之美http://www.infoq.com/cn/articles/react-art-of-simplity
深入浅出React(二):React开发神器Webpackhttp://www.infoq.com/cn/articles/react-and-webpack
深入浅出React(三):理解JSX和组件http://www.infoq.com/cn/articles/react-jsx-and-component
深入浅出React(四):虚拟DOM Diff算法解析http://www.infoq.com/cn/articles/react-dom-diff
深入浅出React(五):使用Flux搭建React应用程序架构http://www.infoq.com/cn/articles/react-flux
react-webpack-cookbook中文版http://fakefish.github.io/react-webpack-cookbook/
Flex 布局语法教程http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html
React 初探http://www.alloyteam.com/2015/04/react-explore/
React虚拟DOM浅析http://www.alloyteam.com/2015/10/react-virtual-analysis-of-the-dom/
react组件间通信http://www.alloyteam.com/2015/07/react-zu-jian-jian-tong-xin/
React 数据流管理架构之 Redux 介绍http://www.alloyteam.com/2015/09/react-redux/
React服务器端渲染实践小结http://www.alloyteam.com/2015/10/8783/
React Native Android 踩坑之旅http://www.alloyteam.com/2015/10/react-native-android-steps-on-tour/
React Native 之 JSBridgehttp://www.alloyteam.com/2015/05/react-native-zhi-jsbridge/
React Native探索系列教程
React Native探索(一):背景、规划和风险http://www.infoq.com/cn/articles/react-native-overview
React Native探索(二):布局篇http://www.infoq.com/cn/articles/react-native-layout
React Native探索(三):与 react-web 的融合http://www.infoq.com/cn/articles/react-native-web
开源APP
研究源码也是一个很好的学习方式
官方演示Apphttps://github.com/facebook/react-native/tree/master/Examples
Facebook F8 Apphttps://github.com/fbsamples/f8app
奇舞周刊 iOS 版(上架应用)https://github.com/fakefish/Weekly75
react-native-dribbble-apphttps://github.com/catalinmiron/react-native-dribbble-app
Gank.io客户端https://github.com/Bob1993/React-Native-Gank
Leanote for iOS(云笔记)https://github.com/leanote/leanote-ios-rn
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/hugohua/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
Segmentfault 客户端https://github.com/fakefish/sf-react-native
糗事百科apphttps://github.com/stormhouse/QiuShiReactNative
孢子社区apphttps://github.com/Hi-Rube/baoz-ReactNative
深JS apphttps://github.com/fraserxu/shenjs
Den - 房屋销售app*https://github.com/asamiller/den
Noder-cnodejs客户端https://github.com/soliury/noder-react-native
知乎日报Android版https://github.com/race604/ZhiHuDaily-React-Native
ziliun-react-nativehttps://github.com/sonnylazuardi/ziliun-react-native
react-native-weather-apphttps://github.com/shevawen/react-native-weather-app
React Native Sample App(Navigation,Flux)https://github.com/taskrabbit/ReactNativeSampleApp
TesterHome社区apphttps://github.com/qddegtya/A-ReactNative-TesterHome
Finance - 股票报价apphttps://github.com/7kfpun/FinanceReactNative
shopping - 购物apphttps://github.com/bigsui/shopping-react-native
zhuiyuan - 追源cms apphttps://github.com/kazaff/ZhuiYuanDemo
uestc-bbs-react-native - UESTC清水河畔RN客户端(with Redux)https://github.com/just4fun/uestc-bbs-react-native
react-native-nw-react-calculator(iOS/Android、Web、桌面多端)https://github.com/benoitvallon/react-native-nw-react-calculator
react-native-nba-apphttps://github.com/wwayne/react-native-nba-app
开源中国的Git@OSC客户端http://git.oschina.net/rplees/react-native-gitosc
rn_bycloud 帮瀛律师端apphttps://github.com/liuchungui/rn_bycloud
ReactNativeRollingExamples - react-native的一些examplehttps://github.com/joggerplus/ReactNativeRollingExamples
Reading App Write In React-Native(Studying and Programinghttps://github.com/attentiveness/reading
图书
《React Native入门与实战》http://item.jd.com/11844102.html
《React Native开发指南》http://www.ituring.com.cn/book/1846
《React Native跨平台移动应用开发》http://item.jd.com/10372998311.html
《React Native:用JavaScript开发移动应用》http://item.jd.com/11785195.html
组件
由于已经有较好的组件库网站,这里就不做总结。可以直接查看如下网站,过后可能精选一部分优质组件出来 :P
React-native组件库(比较全的组件库)https://js.coach/
React Native Moduleshttp://reactnativemodules.com/
最佳轮播类组件https://github.com/leecade/react-native-swiper
react-native-simple-routerhttps://github.com/react-native-simple-router-community/react-native-simple-router
react-native-router-fluxhttps://github.com/aksonov/react-native-router-flux
下拉刷新组件https://github.com/jsdf/react-native-refreshable-listview
模态框https://github.com/brentvatne/react-native-modal
react-native-navbarhttps://github.com/react-native-fellowship/react-native-navbar
滚动轮播组件https://github.com/appintheair/react-native-looped-carousel
HTML显示组件https://github.com/jsdf/react-native-htmlview
Material React Native (MRN)- Material Design组件库https://github.com/binggg/mrn
react-native-gitfeed - GitHub客户端(iOS/Android)https://github.com/xiekw2010/react-native-gitfeed
工具
react-native-snippets(代码提示)https://github.com/Shrugs/react-native-snippets
react-native-babel(使用ES6+)https://github.com/roman01la/react-native-babel
sqlite for react-nativehttps://github.com/almost/react-native-sqlite
gulp-react-native-css(就像写css一样写React Style)https://github.com/soliury/gulp-react-native-css
rnpm(React Native Package Manager)https://github.com/rnpm/rnpm
Pepperoni - React Native项目初始化套件https://github.com/futurice/pepperoni-app-kit
Deco IDE - React Native IDEhttps://www.decosoftware.com/
ignite - React Native CLI项目生成器https://github.com/infinitered/ignite
资源网站
React-native官网http://facebook.github.io/react-native/
React-China社区http://react-china.org/
React Native中文社区http://bbs.react-native.cn/
React-native组件库(比较全的组件库)http://react.parts/
React Native Moduleshttp://reactnativemodules.com/
Use React Native 资讯站(使用技巧及新闻)http://www.reactnative.com/
11款React Native开源移动 UI 组件http://www.oschina.net/news/61214/11-react-native-ui-components
稀土掘金的 React 标签http://gold.xitu.io/#/tag/React.jshttp://gold.xitu.io/#/tag/React%20Native
业界讨论
跨平台开发时代的 (再次) 到来?( Xamarin,NativeScript 和 React Native 对比)http://onevcat.com/2015/03/cross-platform/
谈谈 React Native - 唐巧http://blog.devtang.com/blog/2015/02/01/talk-about-react-native/
如何评价React-Native?https://www.zhihu.com/question/27852694/answer/43990708
React Native概述:背景、规划和风险http://div.io/topic/938
Native与Web的融合 - Qcon中React-Native演讲http://www.infoq.com/cn/presentations/the-fusion-of-native-and-web
使用React Native一年后的感受http://www.dobest.me/blog/2016/06/12/%E4%BD%BF%E7%94%A8React%20Native%E4%B8%80%E5%B9%B4%E5%90%8E%E7%9A%84%E6%84%9F%E5%8F%97/
Weex & ReactNative & JSPatch大对比http://awhisper.github.io/2016/07/22/Weex-ReactNative-JSPatch/
weex&ReactNative对比https://zhuanlan.zhihu.com/p/21677103
文/wu大维(简书作者)原文链接:http://www.jianshu.com/p/d78696e9db3f著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,233评论 4 360
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,013评论 1 291
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,030评论 0 241
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,827评论 0 204
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,221评论 3 286
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,542评论 1 216
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,814评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,513评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,225评论 1 241
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,497评论 2 244
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 31,998评论 1 258
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,342评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 32,986评论 3 235
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,055评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,812评论 0 194
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,560评论 2 271
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,461评论 2 266

推荐阅读更多精彩内容