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

来源:互联网 发布:淘宝好评改差评怎么改 编辑:程序博客网 时间:2024/05/17 12:23
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>
阅读全文
0 0
原创粉丝点击