opendevs
Component Lifecycle Phases

Lists and Keys

Loading video...

Rendering a List (in Hindi)

Concepts

    1

    Rendering a List (in Hindi)
    Rendering a List (in Hindi)

    2

    Keys in List (in Hindi)
    Keys in List (in Hindi)

    3

    Do Not Use Array Index as Keys(in Hindi)
    Do Not Use Array Index as Keys(in Hindi)
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.Finish watching the concept videos to earn    DevCoin image  each
1

We should use keys while rendering lists in React because


Question 1 of 5
2

Which of these statements are true about keys? Select all that apply.


Question 1 of 5
3

Key prop on an element is passed to its children.


Question 1 of 5
4

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
5

Keys don't have to be globally unique. We can use the same keys when we produce two different arrays.


Question 1 of 5
Practice Problems
StatusTitleDifficultyDevCoin image

easy

easy

medium

Copyright © 2022 opendevs

Learn ● Develop ● Ace
All illustrations by Storyset