在有人读取之前,什么都不会被计算。视图通过读取自己的属性来渲染;每个属性再读取它需要的东西;依赖链就从这些读取中自行装配起来。没有订阅要声明,也没有 watch 要注册:读取本身就是订阅。1$my_profile$mol_view2 sub /3<= Name $mol_view4 sub /<= name \1namespace $.$${2export class $my_profileextends$.$my_profile{3@ $mol_mem4user(){5return this.$.$mol_fetch.json('https://api.example.com/me')as{name:string}6}7name(){8return this.user().name9}10}11}渲染 Name 会读取 name(),name() 读取 user(),user() 发出网络请求。没有人告诉视图有这个请求,也没有人告诉请求有这个视图。当 user() 变化时,读取过它的一切都会重新计算,别的什么都不会。