概述
Vue.js 的 computed、watch、模板渲染都建立在响应式依赖追踪之上:组件将 data / props / setup 中的可追踪数据作为依赖,变化时触发更新链。
要点
- 依赖型数据:放在
data、reactive、ref等下的实例状态 - computed / watch:见 Vue computed 与 watch 的区别
- Vue 2 使用
Object.defineProperty;Vue 3 使用Proxy(细节待更多来源摄入后补充)
待补充
- 与
watchEffect、组合式 API 的对照 - 性能与调试(待 ingest 相关文章)

讨论区
欢迎留下想法与补充