Lesson

Every lot needs a key

The street is a list of lots. map turns each lot into a house. React also wants a key so it can tell one child from the next when the list grows.

lots.map((lot) => <House key={lot.id} tag={lot.tag} />)

The key must be stable and unique. A lot id is right. An index is fine for a list that never reorders.

AI often forgets key. The console warning means the lots have no names.

I'm ready. Try the studio →