React Rendering Lists Flashcards
1
Q
What Array method is commonly used to create a list of React elements?
A
The Array.map method.
2
Q
What is the best value to use as a “key” prop when rendering lists?
A
The best way to pick a key is to use a string that uniquely identifies a list item among its siblings. Most often you would use IDs from your data as keys.