两种方式,第一种修改package.json文件;第二种是直接执行npm install --save react-native@版本号。
npm install --save react-native@版本号
通过上诉操作之后,更新模板:
react-native upgrade