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‘;

  把{}去掉就可以了。

文章来自:http://www.cnblogs.com/olivers/p/6018892.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3