Building a Mini Vue: Implementing Observer, Watcher, and Compiler
Vue's source code implements dependency collection using the Observer pattern. It involves three main classes:
Dep: Acts as the observable target. Every data property has a Dep instance containing a subs queue (short for subscribers) that holds all Watcher instances depending on the data. When data changes, dep.notify() is called to inform all ...
Posted on Mon, 24 Aug 2026 16:25:35 +0000 by rcoursey