控制台报错

Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.
使用一个{} 去渲染一个组件 就会报这样一个错误
FooterForm 是一个组件
使用时不小心写成了 {FooterForm} 所以报上面的错误
应该将 {FooterForm} 改为 <FooterForm/>
本文解析了一个常见的React开发错误:尝试将组件作为普通对象渲染,而非作为JSX元素。通过一个具体的例子,即FooterForm组件的不当使用,阐述了如何避免此类错误,强调正确的组件调用方式。
2933

被折叠的 条评论
为什么被折叠?



