Loading SvelteCosmos...
“Svelte 5 reactivity is built on a push-pull reactive signals graph. Sources (state) notify consumers (derived & effects) that a value changed (push phase), while consumers pull the exact value only when required.”
The push-pull reactive dependency graph powering Svelte 5 performance.
// Standalone Universal Reactive Signal
// counter.svelte.js
export function createCounter() {
let count = $state(0);
let double = $derived(count * 2);
return {
get count() { return count; },
get double() { return double; },
increment() { count++; }
};
}Modify the state variable below to watch the signal update the output without VDOM diffing:
Untracked reads avoid creating unnecessary graph nodes, keeping memory footprint tiny.