We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3533763 commit 6c50d7fCopy full SHA for 6c50d7f
README.md
@@ -57,6 +57,7 @@ vx:cuixr1314
57
- [x] 支持最基础的 slots
58
- [x] 支持 Text 类型节点
59
- [x] 支持 $el api
60
+- [x] 支持 watchEffect
61
62
63
#### reactivity
packages/runtime-core/src/apiWatch.ts
@@ -14,10 +14,12 @@ function doWatch(source) {
14
effect.run();
15
};
16
17
+ // 当触发 trigger 的时候会调用 scheduler
18
// 这里用 scheduler 的目的就是在更新的时候
19
// 让回调可以在 render 前执行 变成一个异步的行为(这里也可以通过 flush 来改变)
20
const scheduler = () => queuePreFlushCb(job);
21
22
+ // 这里是在执行 effect.run 的时候就会调用的
23
const getter = () => {
24
source();
25
0 commit comments