2👍
The problem is that data()
does not react to changes in the store
. You need to use a computed property to watch for state changes.
Example:
computed: {
isDisabled: function () {
return this.$store.state.ailment.length < 1
}
}
0👍
You can also use getters if you need to manipulate the data and reuse it.
Getters Vuex
Source:stackexchange.com