The watch Function
watch(source, callback) declares its dependencies explicitly (a ref, getter, or array), runs the callback lazily only when the source changes, and provides both new and old values; watching a reactive object is implicitly deep, while deep-watching large trees costs a full traversal per change check.
This Concept is waiting for its first lesson!
watch(source, callback) declares its dependencies explicitly (a ref, getter, or array), runs the callback lazily only when the source changes, and provides both new and old values; watching a reactive object is implicitly deep, while deep-watching large trees costs a full traversal per change check.
Are you a teacher? Sign in to start contributing.
Sign In