I have a single module imported into the Vuex
store:
import date from './modules/date-select';
export default new Vuex.Store({
modules: {date},
});
Is it possible to "watch" for changes in the entire module within a component? For example:
import { mapState } from 'vuex';
export default {
computed: {
...mapState(['date'])
},
watch: {
'date': function(date) {
console.log(date)
}
}
}
It works fine when watching specific properties of the module like date.timeframe
or date.interval
, but I need to trigger actions when any parameter changes.