2👍
✅
This is always a good practice to add unique key
to elements inside v-for
loop.
Using unique key
s allows to avoid weird behavior when you delete items from an array rendered with v-for
. It helps Vue decide weither to render new data or show the cached one: https://v2.vuejs.org/v2/guide/list.html#key
Starting from Vue 2.2 using key
is required when looping components: https://v2.vuejs.org/v2/guide/list.html#Components-and-v-for
Source:stackexchange.com