Card component have warning message "Each child in a list should have a unique "key" prop." #2515
-
Describe the bugWhen using card component a warning appears on console "Each child in a list should have a unique "key" prop." Ignite version8.9.0 Additional infoSystem JavaScript (and globally-installed packages) Ignite Android iOS Tools |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @ComputerFrek please provide a snippet of how you are using the Card Component? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@ComputerFrek I am sill note sure by the snippet you provided that you are using an underlying loop of some sort, but you can attempt to add the key prop to your card component like this: For a more in depth guide you can go and read here |
Beta Was this translation helpful? Give feedback.
@ComputerFrek I am sill note sure by the snippet you provided that you are using an underlying loop of some sort, but you can attempt to add the key prop to your card component like this:
<Card key={id} content={foodbody} footer={foodfooter} />;
, but for it to work theid
needs to be unique.For a more in depth guide you can go and read here