MCPcopy
hub / github.com/sveltejs/svelte / effect_root

Function effect_root

packages/svelte/src/internal/client/reactivity/effects.js:263–270  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

261 * @returns {() => void}
262 */
263export function effect_root(fn) {
264 Batch.ensure();
265 const effect = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn);
266
267 return () => {
268 destroy_effect(effect);
269 };
270}
271
272/**
273 * An effect root whose children can transition out

Callers 10

date.test.tsFile · 0.90
map.test.tsFile · 0.90
set.test.tsFile · 0.90
url.test.tsFile · 0.90
toStoreFunction · 0.90
connectedCallbackMethod · 0.90
test.tsFile · 0.90
run_testFunction · 0.90
test.tsFile · 0.90

Calls 3

create_effectFunction · 0.85
destroy_effectFunction · 0.85
ensureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…