MCPcopy
hub / github.com/vuejs/composition-api / watchEffect

Function watchEffect

src/apis/watch.ts:400–407  ·  view source on GitHub ↗
(
  effect: WatchEffect,
  options?: WatchOptionsBase
)

Source from the content-addressed store, hash-verified

398}
399
400export function watchEffect(
401 effect: WatchEffect,
402 options?: WatchOptionsBase
403): WatchStopHandle {
404 const opts = getWatchEffectOption(options)
405 const vm = getWatcherVM()
406 return createWatcher(vm, effect, null, opts)
407}
408
409export function watchPostEffect(effect: WatchEffect) {
410 return watchEffect(effect, { flush: 'post' })

Callers 13

setupFunction · 0.90
setupFunction · 0.90
setupFunction · 0.90
watch.spec.jsFile · 0.90
setupFunction · 0.90
ref.spec.tsFile · 0.90
set.spec.tsFile · 0.90
computed.spec.tsFile · 0.90
del.spec.tsFile · 0.90
apiWatch.spec.tsFile · 0.90
watchPostEffectFunction · 0.85

Calls 3

getWatchEffectOptionFunction · 0.85
getWatcherVMFunction · 0.85
createWatcherFunction · 0.85

Tested by 4

setupFunction · 0.72
setupFunction · 0.72
setupFunction · 0.72
setupFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…