MCPcopy Create free account
hub / github.com/Xu22Web/tech-study-js / watchEffect

Function watchEffect

tech-study.js:1268–1273  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

1266 * @returns
1267 */
1268const watchEffect = (callback) => {
1269 currentSub = callback;
1270 // 收集依赖
1271 callback();
1272 currentSub = undefined;
1273};
1274/**
1275 * @description 监听影响 ref
1276 * @param refVal

Callers 6

watchEffectRefFunction · 0.70
handlePropsFunction · 0.70
handleAttributeFunction · 0.70
createTextNodeFunction · 0.70
handleVideoFunction · 0.70
ExamBtnFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected