ReactJs 报错 Element type is invalid: expected a string (from built-in components) or a class/function (for composite components) but got: undefined. Check the render method of `Me`.

  今天在重构一个页面的时候,碰到了一个error,具体的error信息如下图中所示:

  

  最后经过一番查找定位,终于找到了问题所在,原因就是在父组件引用子组件时多加了一个大括号。

  import {Chart} from 'Chart';

  把{}去掉就可以了。

欢迎交流,QQ: 997494167
原文地址:https://www.cnblogs.com/olivers/p/6018892.html