What do you understand by the array detection non-mutation methods?

The methods that do not mutate the original array but always return a new array are known as non-mutation methods.

Following is a list of the non-mutation methods:

  • filter() method
  • concat() method
  • slice() method

Let’s take an example to understand it better. We have a todo list replacing the old array with a new one based on the status filter.


  1. vmvm.todos = vm.todos.filter(function (todo) {  
  2.   return todo.status.match(/Completed/)  
  3. })  

This approach would not re-render the entire list due to Vue.js implementation.