问题描述
我正在运行 GrandStack.IO Grandstack repo
中的 starterapp一切都出现并呈现,但我收到警告:
Warning: Each child in a list should have a unique "key" prop.
Check the render method of `RecentReviews`.
in WithStyles(ForwardRef(TableRow)) (at RecentReviews.js:48)
in RecentReviews (at Dashboard.js:48)
我已经阅读了所有关于此的内容,这实质上意味着循环应该具有唯一 ID 的组件。说得通。但是,第 48 行的表格行确实有一个键
<TableBody>
{data.Review.map((row) => ( <--this is line 48
<TableRow key={row.id}>
<TableCell>{row.date.formatted}</TableCell>
<TableCell>{row.business.name}</TableCell>
<TableCell>{row.user.name}</TableCell>
<TableCell>{row.text}</TableCell>
<TableCell align="right">{row.stars}</TableCell>
</TableRow>
))}
</TableBody>
我到底错过了什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)