Vue.js The array change detection caveats Using Vue.$set


Example

In your method or any lifecycle hook that changes the array item at particuar index

new Vue({
    el: '#app',
    data:{
        myArr : ['apple', 'orange', 'banana', 'grapes']
    },
    methods:{
        changeArrayItem: function(){
            //this will not work
            //myArr[2] = 'strawberry';
            
            //Vue.$set(array, index, newValue)
            this.$set(this.myArr, 2, 'strawberry');
        }
    }
}) 

Here is the link to the fiddle