[Vuejs]-Can I return a value from a watcher? VUE

0👍

It doesn’t make sense to return value from watcher.
Watcher are special reactive hooks which we can utilise to take action on some side-effect, the returned value can’t be utilise. Probably you are looking for computed property.

computed: {
  getColumn() {
   // return value here
  }

}

and in HTML, you can directly use:

<div> Column: { getColumn } </div>

Leave a comment