Home / File/ root.svelte.js — svelte Source File

root.svelte.js — svelte Source File

Architecture documentation for root.svelte.js, a javascript file in the svelte codebase.

Entity Profile

Relationship Graph

Source Code

export function with_root(get_x) {
	const cleanup = $effect.root(() => {
		$effect(() => {
			console.log(get_x());
		});

		const nested_cleanup = $effect.root(() => {
			return () => {
				console.log('cleanup 2');
			};
		});

		return () => {
			console.log('cleanup 1');
			nested_cleanup();
		};
	});

	return cleanup;
}

Domain

Subdomains

Functions

Frequently Asked Questions

What does root.svelte.js do?
root.svelte.js is a source file in the svelte codebase, written in javascript. It belongs to the BuildSystem domain, QualityControl subdomain.
What functions are defined in root.svelte.js?
root.svelte.js defines 1 function(s): with_root.
Where is root.svelte.js in the architecture?
root.svelte.js is located at packages/svelte/tests/runtime-runes/samples/effect-root-3/root.svelte.js (domain: BuildSystem, subdomain: QualityControl, directory: packages/svelte/tests/runtime-runes/samples/effect-root-3).

Analyze Your Own Codebase

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

Try Supermodel Free