Here is a piece of code that demonstrates a computed property:
computed: {
filterText: {
get() {
return this.filter; // vuex state
},
set(value) {
this.setFilter(value); // vuex action
}
}
}
Now, I am looking to refactor this code into class-based components. I have figured out the getter part, but I am unsure about how to implement the setter function. Can you help?
get filterText() {
return this.filter
}