Lists and Keys
Map data to elements. Provide a stable key prop (usually an id) so React can reconcile lists correctly.
- Avoid using array index as key if the list can reorder.
- Keys must be unique among siblings.
- Extract a Row component when map bodies grow.
After you read this chapter, use Write (when available) and Quiz on this page to lock it in.