Linked Signal

Angular Signals: set() vs update() - When to Use Each

Angular Signals: set() vs update() - When to Use Each

December 06, 2024

Choosing between set() and update() for writable signals in Angular seems trivial, but the wrong choice leads to verbose code, unnecessary complexity, or missed optimization opportunities. set() replaces the entire signal value, while update() transforms the current value using a callback function. This tutorial explains when each method is appropriate, demonstrates real-world examples, and shows how to write cleaner, more efficient signal update code.

Angular linkedSignal(): Advanced Features and Multiple Sources (v19+)

Angular linkedSignal(): Advanced Features and Multiple Sources (v19+)

November 29, 2024

Angular's linkedSignal() goes beyond simple two-way binding with advanced features that enable intelligent update logic. By comparing old and new values, you can create conditional updates, prevent unnecessary changes, and implement complex state synchronization patterns. This tutorial explores advanced linkedSignal() features including value comparison callbacks, multiple source signals, and smart update strategies that optimize performance and reduce unnecessary re-renders.

Angular linkedSignal(): Create Writable Signals from Other Signals (v19+)

Angular linkedSignal(): Create Writable Signals from Other Signals (v19+)

November 15, 2024

Angular 19 introduces linkedSignal(), a powerful new primitive for creating writable signals that automatically sync with other signals. Unlike computed signals which are read-only, or effects which cause side effects, linked signals provide a clean way to create two-way reactive bindings. This tutorial demonstrates how to use linkedSignal() to simplify form state management, create reactive UI components, and avoid common anti-patterns with effects.