Here is my function in ShoppingList.js,
`
function ShoppingList() {
return (
<ul className="lmj-plant-list">
{plantList.map(({ id, cover, title, description }) => (
<PlantItem
to={"/logement/" + plantList.id + "/#"}
id={id}
title={title}
cover={cover}
description={description}
/>
))}
</ul>
);
}
` I retrieve the data here and post it on PlantItem, it works but i have an error which is displayed in the console
the console :
Warning: Each child in a list should have a unique "key" prop.
Check the render method of `ShoppingList`. See https://reactjs.org/link/warning-keys for more information.
at div
at ShoppingList
at div
at App
at RenderedRoute (http://localhost:3000/static/js/bundle.js:39974:5)
at Routes (http://localhost:3000/static/js/bundle.js:40397:5)
at Router (http://localhost:3000/static/js/bundle.js:40335:15)
at BrowserRouter (http://localhost:3000/static/js/bundle.js:38682:5)
I'm new to react and I can't fix this little problem.