问题描述
我在 item
数组中有一个列列表,在 An error occurred while rendering the visualization: Error: Objects are not valid as a React child (found: Invalid Date). If you meant to render a collection of children,use an array instead.
数组中有所有数据。
以下代码在控制台中运行良好。但在反应中它显示了这个错误 <div>
{
data.map((item) => {
console.log("new row: ")
return (
<div className="row">
{
keylist.map(subitem => {
return(
// <p>{item[subitem]}</p>
console.log(item[subitem])
)
})
}
</div>
)
})
}
</div>
tn,tp,fn,fp
85 305588 21 3
解决方法
这是一个例子。这是打印数据并显示在屏幕上。乐于助人
https://codesandbox.io/s/reverent-cherry-hvwr4?file=/src/App.js