控制台报错: ReactCurrentOwner of undefined
解决办法: RN 版本的问题
- As I mentioned, make sure youve installed the correct version of React. If youre using React Native 0.45:
- yarn add react@16.0.0-alpha.12
- npm install react@16.0.0-alpha.12 --save-dev
- npm install --save-dev babel-preset-es2015
- test:/\.jsx?$/,
- exclude:/node_modules/,
- loader:babel-loader,
- query:{presets:[es2015,react]
- }
- Your config is
- presets: [es2015, react]
- but the only preset youve installed is
- +-- babel-preset-es2015@6.18.0
- So your answer is
- npm install --save-dev babel-preset-react
来源: http://www.bubuko.com/infodetail-2504351.html