React Native 使用Yarn (环境)

React Native 使用Yarn, Yarn是Facebook提供的替代npm的工具,可以加速node模块的下载

1. 安装Yarn: 

npm install -g yarn react-native-cli

2. 设置国内镜像:

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

npm config set disturl https://npm.taobao.org/dist --global

3. 命令, 参考:https://blog.csdn.net/u013233097/article/details/78652728

react-native init projectname

npm install --> yarn

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容