Question: You are rendering a list with React when this warning appears in the console: "Warning: Each child in a list should have a unique 'key' prop." How do you fix this issue?
- Pass the name of each item as its key.
- Add a key prop with the same value to each item the list.
- Clear the console warnings.
- When iterating over the list items, add a unique property to each list item.
Answer: The correct answer of the above question is Option D:When iterating over the list items, add a unique property to each list item.