Skip to content
masterclass Buddy

Vue.js · Function

watchEffect

watch() runs a callback when one or more chosen reactive sources change. It gives explicit control over the source, callback timing, initial run, nested changes, and cleanup.

Last updated

Since
3.4+ for once; 3.5+ for numeric deep and onWatcherCleanup

Syntax

watch(source, callback, options?)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • watchEffect()
  • watchPostEffect()
  • watchSyncEffect()
  • onWatcherCleanup()
  • ref()
  • computed()

Source: Reactivity API: Core | Vue.js. Checked 2026-11-03.