Not calling watch even after the prop change in vue.js

  1. but i cant use immediate:true, except immediate true is anyother thing i can do?? and why watch is not calling even after the data change in prop. only it is calling for the first time when application loads.
export default {
  name: "Tabs",
  data () {
    return {
      init: false,
      currentTab: "tab-0",
      tab: null,
    }
  },
  props: {
    config: {
      type: Object,
      default: undefined
    },
    dynamicSelection: 0
  },
}

watch: {
    config: {
      handler: function (val) { //need to do something }
          }
       }

Source: AngularJS Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.