为了账号安全,请及时绑定邮箱和手机立即绑定

React.createElement: type is invalid

React.createElement: type is invalid

皈依舞 2019-02-28 14:20:37
我是新接触react不久,想用antd+react自己做一个demo,之前有写过这样类似的结构,但是不知道为什么这次就报这样的错,自己排了快一个小时了,也不知道什么原因,求助求助上面这个是组件部分 <div className = 'main-content' style = {{padding: '1rem'}}>    <AccountSelectInfo / ></div>这个是报错3warning.js?0260:33 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. Check the render method of AccountSelectInfo.
查看完整描述

1 回答

?
慕婉清6462132

TA贡献1804条经验 获得超2个赞

错误的地方应该是FormItem组件,应该是let FormItem = Form.Item; Item是大写的;Form.item的值为undefined


查看完整回答
反对 回复 2019-03-05
  • 1 回答
  • 0 关注
  • 1264 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号