Lists and Keys
A list is a collection of ordered or unordered items. Creating a list is a super common technique for displaying a list of data. In React, you can use the map() function of arrays to iterate over a list and render the data.
Loading video...
Rendering a List (in Hindi)
Concepts
1

Rendering a List (in Hindi)
2

Keys in List (in Hindi)
3

Do Not Use Array Index as Keys(in Hindi)
Watch the full video to earn 3
Quizzes
1
We should use keys while rendering lists in React because
Question 1 of 5
1
per question2
Which of these statements are true about keys? Select all that apply.
Question 1 of 5
1
per question3
Key prop on an element is passed to its children.
Question 1 of 5
1
per question4
If you get a warning like this in console, what are some of the possible reasons? Select all that apply.
Warning: Each child in a list should have a unique "key" prop
Question 1 of 5
1
per question5
Keys don't have to be globally unique. We can use the same keys when we produce two different arrays.
Question 1 of 5
1
per question