1.引入React和React-Native的时候要注意React-Native对React是有版本要求的,版本不合适会在npm install完成后看到一个版本问题的warn。这时候删除node_modules重新安装。实验出目前可用最新的package.json为:
{
"name": "your name",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react": "15.4.1",
"react-native": "0.42.3"
}
}
- React-Native通过pod引入到现有项目出现如下错误:
网友评论