← Angular learning path
Angular · Module 9 of 10

Signals and state

Manage reactive state with signals, computed values and services.

📖 Key ideas

  1. A signal holds a value: count = signal(0).
  2. Read with count(), write with count.set(1) or count.update(c => c + 1).
  3. computed() derives values; effect() runs side effects.
  4. Signals make change detection precise.
  5. For big apps: services with signals or NgRx store.
💡 Real-life example: A signal is a light switch wired to bulbs: flip it and only the connected bulbs (views) change.
signal()Reactive value holder
computed()Derived signal
effect()Runs when signals change
NgRxRedux-style store for Angular