Objects are not valid as a React child 错误处理

前端之家收集整理的这篇文章主要介绍了Objects are not valid as a React child 错误处理前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Objects are not valid as a React child (found: object with keys {value,onChange}). If you meant to render a collection of children,use an array instead or wrap the object using createFragment(object) from the React add-ons.

当使用react 输出一个object 的时候,会报错

<span>{{a:1}}</span>

正确如下:

<span>{1}</span>
原文链接:https://www.f2er.com/react/302728.html

猜你在找的React相关文章