Answer the question
In order to leave comments, you need to log in
Is a computed property reactive with get() and set()?
The Vue component has a computed property that needed to add a setter as well . But for some reason the color of the button depending on this property does not change after changing it. Reactivity is broken.
Inside the methods, we are working with a property from an external module.
Is that how it's supposed to be or did I screw up somewhere?
Example:
Answer the question
In order to leave comments, you need to log in
your state object is not reactive. in order for it to be such, it must either be initialized in data:
const comp = Vue.component('comp', {
...
data() {
return state
},
...
})
const state = Vue.observable({ z: false });
const comp = Vue.component('comp', {
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question