I'm using VueJs and I need to watch a bool multiple time and when its true, do an action. I have found that the watch doesn't trigger when the current value is change for the same value (https://github.com/vuejs/vue/issues/1302).
For the moment, I just set the bool to false before every action where I can change the value and inside my watch I have a if where I check if the bool is true. Someone know a better way to do that?
watch: {
'$store.state.recommandationModule.recommandationSetCorrectly': function (val) {
if (val) {
// Do action
}
}
}