Question - What are the array detection non-mutation methods in Vue.js?
Answer -
The array detection non-mutation methods in Vue.js are the methods that do not mutate the original array but always return a new array.
Following is a list of the non-mutation methods:
filter()
concat()
slice()
For example, let's take a todo list where it replaces the old array with new one based on status filter:
vmvm.todos = vm.todos.filter(function (todo) {
return todo.status.match(/Completed/)
})