effect_root() — svelte Function Reference
Architecture documentation for the effect_root() function in effects.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD cf74814c_38ff_1817_80eb_cbc1bb490472["effect_root()"] 1ae6fa4e_16ee_acdf_5e28_17eb0819fddb["effects.js"] cf74814c_38ff_1817_80eb_cbc1bb490472 -->|defined in| 1ae6fa4e_16ee_acdf_5e28_17eb0819fddb d677216e_46d5_c70b_1d0e_82e2fcf6a340["toStore()"] d677216e_46d5_c70b_1d0e_82e2fcf6a340 -->|calls| cf74814c_38ff_1817_80eb_cbc1bb490472 85925f22_d68e_6c4f_4ede_e0b915dcdbfd["run_test()"] 85925f22_d68e_6c4f_4ede_e0b915dcdbfd -->|calls| cf74814c_38ff_1817_80eb_cbc1bb490472 2ec0d2fd_8bbc_b2ba_53ae_f2da02bb3ba5["ensure()"] cf74814c_38ff_1817_80eb_cbc1bb490472 -->|calls| 2ec0d2fd_8bbc_b2ba_53ae_f2da02bb3ba5 9764bb93_860c_6dee_2112_890b69ee0aa3["create_effect()"] cf74814c_38ff_1817_80eb_cbc1bb490472 -->|calls| 9764bb93_860c_6dee_2112_890b69ee0aa3 410f774f_2d1a_7114_fcba_b292ed7cae3a["destroy_effect()"] cf74814c_38ff_1817_80eb_cbc1bb490472 -->|calls| 410f774f_2d1a_7114_fcba_b292ed7cae3a style cf74814c_38ff_1817_80eb_cbc1bb490472 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/internal/client/reactivity/effects.js lines 253–260
export function effect_root(fn) {
Batch.ensure();
const effect = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn, true);
return () => {
destroy_effect(effect);
};
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does effect_root() do?
effect_root() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/reactivity/effects.js.
Where is effect_root() defined?
effect_root() is defined in packages/svelte/src/internal/client/reactivity/effects.js at line 253.
What does effect_root() call?
effect_root() calls 3 function(s): create_effect, destroy_effect, ensure.
What calls effect_root()?
effect_root() is called by 2 function(s): run_test, toStore.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free