Start your All-Access Pass to unlock this challenge
Challenge 1 / 1
In this video, we start with a component that iterates through a list of
items using the items' index
in the Array as key
, like so:
<shopping-cart-item
v-for="(item, index) in items"
:key="index"
:item="item"
/>
But this is not ideal! In a real application, each item should have an
id that is unique to that item for the key
attribute. But why is this so?
Skip challenges and go to theNext Chapter