What are Angular signals and how do they change reactivity?
Assesses fundamental understanding of Angular conventions, runtime behavior, and memory/performance considerations.
Hiring managers look for precision, avoidance of ambiguous jargon, and ability to explain trade-offs under real production conditions.
Signals are Angular's fine-grained reactive primitive. A signal(0) holds a value; reading it with count() registers the consumer as a dependency, and writing with count.set(1) or count.update(v => v + 1) marks dependents dirty. computed() derives a memoised value that recomputes lazily, and effect() runs a side effect whenever its tracked signals change.
const price = signal(10);
const qty = signal(2);
const total = computed(() => price() * qty());
effect(() => console.log(total()));
Unlike zone-based change detection, signals let Angular know exactly which views depend on which state and update only those, enabling zoneless applications. Signal inputs (input()), queries (viewChild()) and model() integrate them with components. untracked() reads without registering a dependency, and linkedSignal or resource handle derived and async cases.
Avoid writing signals inside computed, since computeds must be pure, and use effect sparingly to synchronise with non-reactive APIs. Signals are the direction Angular is moving toward.
Candidate Response Strategy & Interview Tips
- Start with a concise one-sentence summary: Deliver a direct, confident answer first before expanding into nuances.
- Demonstrate real-world trade-offs: Discuss where this approach excels and when you would avoid it in production systems.
- Discuss complexity & edge cases: Proactively explain time/space complexity or boundary conditions (null values, scale limits).
- Prepare for interviewer follow-ups: Technical hiring panels frequently probe deeper into concurrency, backward compatibility, or alternative libraries.