Computed Setters
In the last exercise, you saw how to write maintainable and declarative computed properties that are reusable and reactive and can be called anywhere within your component. In some real-world cases when a computed property is called, you may need to call an external API to correspond with that UI interaction or mutate data elsewhere in the project. The thing that performs this function is called a setter.
Computed setters are demonstrated in the following example:
data() { return { count: 0 } }, computed: { myComputedDataProp: { // getter get() { return this.count + 1 }, // setter set(val) { this.count = val - 1 ...