Vue · Senior · Question 11 of 75

What goes wrong when v-for uses the index as key and items are inserted at the top?

Explanation

With stable ids Vue moves existing nodes. Index keys only work for static lists or lists without component state.

Further reading

Problem with a question

Vue · Senior · question 11

Test yourself

Take the Vue · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz