Functions are not valid as a React child. This may happen if you return a Component instead of 「Comp

2022-01-24 19:33:07 浏览数 (1)

控制台报错

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/>

0 人点赞