Array Mutations Observer


As we all know that the array is immutable in nature, so we cannot increase and decrease the size of the array, but in polymer Js we can do this by using the "Array Mutations Observer" concept to make the array mutable.

\\Syntax
static get LFC(){
return[
‘callback(arrayName.splices)'
]
}
\\Example
static get LFC(){
return[ 'changed(lfc.splices)' ]
}
\\contacts is an array which contains items
\\.splices makes an array mutable

If any change happen in the structure of an array, then changed() is callback function gets invoked





Visit :


Discussion



* You must be logged in to add comment.