react-native 大白之路

小白请参照官方文档

http://reactnative.cn/docs/0.47/getting-started.html

本机开发

react-native --version
react-native-cli: 2.0.1
react-native: 0.47.1

在react-native run-ios 时候,遇到一个问题需要在xcode编译才能看出来

boost/config/user.hpp file not found

(不要百度)Google后,找到了解决方案,原因是

~/.rncache

这个目录里的目标文件被强了,删除后,需要手动curl 下载

https://github.com/google/glog/archive/v0.3.4.tar.gz
https://github.com/google/double-conversion/archive/v1.1.5.tar.gzhttps://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gzhttps://github.com/facebook/folly/archive/v2016.09.26.00.tar.gz

基本工作准备就绪,下一步执行开发


根据网上查找的资料比对(我喜欢使用新的),本次大白开发使用如下组件(待补齐):

1. react-navigation
2. mobx-react

1.导航及路由

react-navigation
安装命令(yarn或npm):

yarn add react-navigation
npm install --save react-navigation

2.数据状态管理

mobx-react(也可以使用redux)
安装命令:

yarn add mobx
yarn add mobx-react

你可能感兴趣的:(react-native 大白之路)