Objects are not valid as a React child

Objects are not valid as a React child (found: object with keys {}). If you meant to render a collection of children, use an array instead.

之所以报这个错是因为渲染的是一个对象,因此在JSX中无法显示出来。
看看下面这个例子:

const Counter = ({value,onADD,onDEC})=>{
    return 

{value}

}

这个value是一个对象,如果渲染在这里就会报错。

你可能感兴趣的:(redux,Objects,are,not,valid,as,a,React,ch)