Tagged articles
2 articles
Page 1 of 1
MaGe Linux Operations
MaGe Linux Operations
Dec 6, 2023 · Frontend Development

Mastering Vue's Reactivity: From Object.defineProperty to Proxy

This article explains the fundamentals of Vue's reactivity system, comparing Vue2's Object.defineProperty approach with Vue3's Proxy-based implementation, and walks through building a custom dependency-collection model with code examples, key-level tracking, and branch-aware cleanup to achieve precise reactive updates.

Dependency CollectionProxyReactivity
0 likes · 9 min read
Mastering Vue's Reactivity: From Object.defineProperty to Proxy
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Jul 3, 2020 · Frontend Development

Understanding Vue.js Dependency Collection and the Observer Pattern

This article explains how Vue.js implements its reactivity system using the observer pattern, detailing the roles of Dep and Watcher classes, the observe function, Object.defineProperty handling for objects and arrays, and providing annotated code examples to illustrate the complete dependency‑collection workflow.

Dependency CollectionObserver PatternReactivity
0 likes · 16 min read
Understanding Vue.js Dependency Collection and the Observer Pattern