Uncaught Error: Objects are not valid as a React child (found: Error: Objects are not valid as a React child (found: object with keys {name}). If you meant to render a collection of children, use an array instead.
class Index extends Component {
constructor(props) {
super(props);
}
componentDidMount() {}
render() {
const tagsAry=[{name:1}]
return (
<div>{tagsAry}</div>
)
}
意思是:未捕获错误:对象作为React子对象无效(找到:具有键{content,key,duration}的对象)。如果要呈现子对象集合,请改用数组。
非对象类型
数据;tagsAry[0].name
或 对象的属性值;