编译命令
- 运行 server
react-native start 或者 npm start
- 运行 客户端
react-native run-android
- 安装模块,添加依赖
npm install react-native-swiper --save
- 查看模块
npm view react-native-swiper
- 删除模块
npm rm react-native-swiper
- 创建项目
react-native init 项目名称
- 查看版本号
react-native --version
- 查询 react-native 依赖npm包
npm info react-native
- 查询 react-native 项目包
进入项目根目录, cat package.json
- 升级 项目内的库
进入项目根目录,react-native upgrade
- 升级 React Native
sudo npm update -g react-native-cli (如果权限没有限制没必要用sudo)