Home / Function/ template_effect() — svelte Function Reference

template_effect() — svelte Function Reference

Architecture documentation for the template_effect() function in effects.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  cb33ef2f_2e6e_0042_436d_4ff6a84c5836["template_effect()"]
  1ae6fa4e_16ee_acdf_5e28_17eb0819fddb["effects.js"]
  cb33ef2f_2e6e_0042_436d_4ff6a84c5836 -->|defined in| 1ae6fa4e_16ee_acdf_5e28_17eb0819fddb
  51425661_32dd_029c_f8aa_2371b127bd7f["html()"]
  51425661_32dd_029c_f8aa_2371b127bd7f -->|calls| cb33ef2f_2e6e_0042_436d_4ff6a84c5836
  b9aaaccb_7510_28de_bb53_f808b2cb1d5e["flatten()"]
  cb33ef2f_2e6e_0042_436d_4ff6a84c5836 -->|calls| b9aaaccb_7510_28de_bb53_f808b2cb1d5e
  9764bb93_860c_6dee_2112_890b69ee0aa3["create_effect()"]
  cb33ef2f_2e6e_0042_436d_4ff6a84c5836 -->|calls| 9764bb93_860c_6dee_2112_890b69ee0aa3
  style cb33ef2f_2e6e_0042_436d_4ff6a84c5836 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/reactivity/effects.js lines 366–370

export function template_effect(fn, sync = [], async = [], blockers = []) {
	flatten(blockers, sync, async, (values) => {
		create_effect(RENDER_EFFECT, () => fn(...values.map(get)), true);
	});
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does template_effect() do?
template_effect() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/reactivity/effects.js.
Where is template_effect() defined?
template_effect() is defined in packages/svelte/src/internal/client/reactivity/effects.js at line 366.
What does template_effect() call?
template_effect() calls 2 function(s): create_effect, flatten.
What calls template_effect()?
template_effect() is called by 1 function(s): html.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free