React TutorialLesson 28Free preview
React Lists
This lesson is part of React · All levels
Summary
The array array is rendered into a set of elements using the map method. Each element generated should have a unique key property value so that React can track changes properly. Without a stable key, the performance and consistency of the display can be disrupted.
Key points
- Use array.map to convert data into JSX elements
- The key property helps React recognize each item uniquely
- Avoid using index as a key on a list that changes order frequently
- Filter the data first if only a portion of the items you want to display
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.