React · Junior · Question 60 of 75

Must key values be unique across the whole app?

Explanation

Two different lists can reuse the same ids as keys. key isn't passed to the component as a prop; pass the id separately if the child needs it.

Further reading

Problem with a question

React · Junior · question 60

Test yourself

Take the React · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz