首页 > Web开发 > 详细

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`.

时间:2016-11-01 14:26:54      阅读:17598      评论:0      收藏:0      [点我收藏+]

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

  技术分享

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

  import {Chart} from ‘Chart‘;

  把{}去掉就可以了。

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`.

原文:http://www.cnblogs.com/olivers/p/6018892.html

(0)
(9)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!