问题:
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `_class`.
![](https://img-blog.csdnimg.cn/20190802105946231.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNjQ4NDUy,size_16,color_FFFFFF,t_70)
原因:
因为将默认导出与命名导入混合在一起。使用其中一个。
![](https://img-blog.csdnimg.cn/20190802110212192.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNjQ4NDUy,size_16,color_FFFFFF,t_70)
解决:
修改impot路径 ,删除了多余的注入
![](https://img-blog.csdnimg.cn/20190802110446371.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNjQ4NDUy,size_16,color_FFFFFF,t_70)
注: 出现一个问题的原因有很多因素,此答案仅供参考,希望能帮助到您。