Computer Science, asked by WatsalKumar2962, 1 year ago

Why is it discouraged to have list index as a key while rendering an array of items

Answers

Answered by vaishaligrace2
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