React 导入组件前段浏览器报错 “Cannot read property 'Component' of undefined”

 

 问题出在这个花括号上,当你写{React}的时候,他只会导入React,并不会导入下面你要用到的Component组件,

所以,将括号去掉就可以了。

别忘记保存。

posted @ 2020-03-15 15:09  Black_Climber  阅读(1182)  评论(0编辑  收藏  举报