我收到以下错误:
Warning: Each child in a list should have a unique "key" prop.
Check the render method of `App`.
See https://reactjs.org/link/warning-keys for more information.
WithStyles@http://localhost:3000/static/js/vendors~main.chunk.js:39295:25
App@http://localhost:3000/static/js/main.chunk.js:197:91
这是我的代码:
function Table({ countries }) {
return (
<div className="table">
{countries.map(({ country, cases }) => {
<tr>
<td>{country}</td>
<td>
<strong>{cases}</strong>
</td>
</tr>
})}
</div>
)
}