Home/Tutorials/React/Lists and Keys

0 of 2 saved

React5 min read

Lists and Keys

Read this chapter, then pass a short check to open the next one.

Render arrays of UI.

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.