Vue in v-for key binding and not binding key difference

First, they differ primarily in the virtual DOM reuse, key bindings can better reuse, let's talk about the details

If we have an array arr = [1,2,3,4], we have to insert a value of 2 in the back 9;

If you bind a key value, it will be the case:

If there is no binding key value, it will be the case: 

 

Guess you like

Origin www.cnblogs.com/adongyo/p/11287887.html