react-native
需要的工具
.nodejs
.rn cli
打开终端,切换到根路径(mac中修改npm的默认安装来源)
一、open .npmrc(会提示找不到该文件,没关系)
二、npm config set registry https://registry.npm.taobao.org
三、再次跳到步骤一,就能看到npmrc文件中已经设置好了registry
.安装nodejs
brew install node
.完成后输入
node -v
npm -v
.安装rn cli
npm install -g react-native-cli
.初始化第一个项目
react-native init firstApp
.切换到项目根目录,运行 ios,android
react-native run-ios ,react-native run-android
as先安装安卓sdk
=========
体验不是很好。。。。
手机扫一扫
移动阅读更方便
你可能感兴趣的文章