0 votes
in VueJS by
What are the array detection mutation methods in VueJS?

1 Answer

0 votes
by
As the name suggests, mutation methods modifies the original array. Below are the list of array mutation methods which trigger view updates.

push()

pop()

shift()

unshift()

splice()

sort()

reverse()

If you perform any of the above mutation method on the list then it triggers view update. For example, push method on array named 'items' trigger a view update,

vm.todos.push({ message: 'Baz' })

Related questions

0 votes
asked Feb 4, 2020 in VueJS by rajeshsharma
0 votes
asked Apr 13, 2022 in VueJS by john ganales
...