Why is it discouraged to have list index as a key while rendering an array of items
Answers
Answered by
2
Answer:
Each child in an array or iterator should have a unique “key” prop. So, as a lazy developer, you would simply pass in the loop's index value as the key value of the child element. ... The reason is because you are not passing an unique key for each child element in the list.
Explanation:
Similar questions
Math,
6 months ago
Math,
6 months ago
Social Sciences,
6 months ago
Sociology,
1 year ago
Math,
1 year ago