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

  把{}去掉就可以了。

posted @ 2016-11-01 11:53  cooljser  阅读(1338)  评论(0编辑  收藏  举报