Vue 3 · Reactivity

React to a change

Run code when a source changes.

watch(count, (newValue, oldValue) => {
  console.log(newValue, oldValue);
});

Official Vue 3 documentation

More reactivity commands

All reactivity commands · Vue 3 cheatsheet

Was this page helpful?