wechat-miniprogram / mobx-miniprogram-bindings

小程序的 MobX 绑定辅助库
MIT License
206 stars 20 forks source link

每次修改store的时候都会触发setTimeout #44

Closed neoprience closed 4 months ago

neoprience commented 6 months ago

每次修改store的时候都会触发setTimeout, 这个定时器会清除吗,我发现一直再verbose里面警告,但是搜了bindings的源码没有settimeout,很无奈,我这个大程序性能不好的手机有点卡了

neoprience commented 6 months ago

image

LastLeaf commented 4 months ago

会的。

每次更新之后会等到 nextTick 再应用到界面上,要不然一下子改很多次 data 的话性能太差了。