Signals (signal, computed)

A signal is a reactive Angular value that notifies its consumers when it changes. signal() creates a value modifiable with set or update, computed() derives a read-only value that is recomputed automatically. You read a signal by calling it like a function.

Example

const n = signal(0)
const double = computed(() => n() * 2)
n.set(3)

Related concepts

The whole glossary