Open baratdev opened 3 years ago
index.js:1 Warning: Each child in a list should have a unique "key" prop.
how i can resolve this issue where i have to add unique key, I'm pasting my code here please guide me.
<Navigation activeItemId={location.pathname} onSelect={({ itemId }) => { history.push(itemId); }} items={[ { title: "Dashboard", itemId: "/", elemBefore: () => , }, { title: "Management", //itemId: "/management", elemBefore: () => , subNav: [ { title: "Projects", itemId: "/about", elemBefore: () => , }, { title: "Members", itemId: "/", elemBefore: () => , }, ], }, { title: "Another Item", itemId: "/another", subNav: [ { title: "Teams", itemId: "/management/teams", }, ], }, ]} />
index.js:1 Warning: Each child in a list should have a unique "key" prop.
how i can resolve this issue where i have to add unique key, I'm pasting my code here please guide me.
<Navigation activeItemId={location.pathname} onSelect={({ itemId }) => { history.push(itemId); }} items={[ { title: "Dashboard", itemId: "/", elemBefore: () => ,
},
{
title: "Management",
//itemId: "/management",
elemBefore: () => ,
subNav: [
{
title: "Projects",
itemId: "/about",
elemBefore: () => ,
},
{
title: "Members",
itemId: "/",
elemBefore: () => ,
},
],
},
{
title: "Another Item",
itemId: "/another",
subNav: [
{
title: "Teams",
itemId: "/management/teams",
},
],
},
]}
/>