ReactNative环境配置(第1篇)

来源:互联网 发布:如何给mac磁盘分区 编辑:程序博客网 时间:2024/06/03 20:17

1.安装HomeBrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


2.安装node.js


3.brew install watchman(非必须)



4;brew install flow(非必须)



5.安装RN环境

sudo npm install -g react-native-cli



6.设置淘宝镜像下载快一点(非必须)

npm config set registry https://registry.npm.taobao.org

npm config set disturl https://registry.npm.taobao.org/dist



7.创建RN项目react-native init项目名称(最好指定cd到桌面在执行命令)

react-native init RN


8.安装一些第三方组件(需要指定cdiOS工程目录下才执行)

sudo npm install react-native-root-modal    类似Toast的第三方组件

sudo npm install react-native-tab-navigator  底部安卓和iOS导航   

0 0
原创粉丝点击