Answer the question
In order to leave comments, you need to log in
watch vs subscribe vs if?
https://vuex.vuejs.org/api/#watch
https://dev.to/viniciuskneves/watch-for-vuex-state...
1 - why watch the state when you can just apply or if you can output immediately
2 - :if="getSomeValueState"
{{ stateGetterOfValue }}
mounted() {
this.$store.watch(
does not work, why? watch: {
on the main instance? this.$store.subscribe
works, but again, why and when to use it, because there is a watch
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question