控制台报错: ‘ReactCurrentOwner‘ of undefined
解决办法:RN版本的问题。
As I mentioned, make sure you‘ve installed the correct version of React. If you‘re using React Native 0.45: yarn add [email protected]
npm install [email protected] --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 you‘ve installed is
+-- [email protected]
So your answer is
npm install --save-dev babel-preset-react