I am using vuex and vuejs 2 together.
vuex
vuejs 2
I am new to vuex, I want to watch a store variable change.
store
I want t
When you want to watch on state level, it can be done this way:
let App = new Vue({ //... store, watch: { '$store.state.myState': function (newVal) { console.log(newVal); store.dispatch('handleMyStateChange'); } }, //... });