Angular 19 introduces `linkedSignal`, a new reactive primitive that creates writable signals automatically synchronized with a source signal. Unlike `computed()` signals which are read-only, `linkedSignal` allows explicit value setting while still reacting to upstream changes. Two usage patterns are covered: a full object syntax with `source` and `computation` properties, and a shorthand function syntax. A practical example shows resetting a student count whenever a course ID input changes, demonstrating how `linkedSignal` simplifies reset patterns and improves flexibility over traditional computed signals.

3m read timeFrom playfulprogramming.com
Post cover image
Table of contents
The Problem with Reset Patterns Copy link Link copied!The linkedSignal Solution Copy link Link copied!Understanding linkedSignal Copy link Link copied!Key Benefits of LinkedSignals Copy link Link copied!Conclusion Copy link Link copied!

Sort: