安装依赖
1 | brew install node |
更换npm源
1 | npm config set registry https://registry.npm.taobao.org --global |
安装react-native-cli
1 | npm install -g react-native-cli |
安装yarn, yarn在安装依赖时会比npm快
1 | brew install yarn |
创建react native 工程
1 | react-native init AwesomeProject |

1 | brew install node |
1 | npm config set registry https://registry.npm.taobao.org --global |
1 | npm install -g react-native-cli |
1 | brew install yarn |
1 | react-native init AwesomeProject |
