What are the array detection mutation methods?

Posted by Jennifer | Updated on

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

  1. push()
  2. pop()
  3. shift()
  4. unshift()
  5. splice()
  6. sort()
  7. 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,

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers