How to properly watch for nested data

How to properly watch for nested data

Asked on November 12, 2018 in vue.js.
Add Comment


  • 1 Answer(s)

    Use a deep watcher for this:

    watch: {
      item: {
         handler(val){
            // do stuff
         },
         deep: true
       }
    }
    

    It will spot any changes to the objects in the item array and count to the array itself

    Answered on November 12, 2018.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.