Angular signal tower: 20 levels predicting fire counts for signal, computed, effect, input, model and linkedSignal. A glitch-free runtime built from scratch.
signal(0) holds one value. Call volume() to read it, volume.set(5) to write. effect(() => …) notes the signals it reads and sounds again whenever one of them changes. In Angular 20 an effect does not run when it is created: it waits for change detection.
update(fn) writes what fn makes of the old value. Angular never runs an effect in the middle of the code that is writing: each write marks the effect dirty, and the effect runs once at the change detection after the event.
computed(() => this.x() * 2) is a lazy, stored derived value: it computes when read, keeps the result, and computes again only when read after one of the signals it read has changed. A box nobody reads never turns.
Angular pushes a dirty mark downstream when you write (push), then pulls values from upstream when something reads (pull). That is why a diamond makes no glitch: each box computes at most once per change detection, with all its sources fresh.
effect() returns an EffectRef. A function registered with onCleanup runs before the effect runs again and when the effect is destroyed. ref.destroy() stops the effect for good.
untracked(fn) runs fn with no active consumer, so the signals read inside it are not recorded as sources. Use it for a value you need to see now without it triggering anything.