Skip to solution
hardFrontend

What are Angular Signals?

384 views
01

Understand the problem

Explain the modern signals reactivity model.

signalsreactivity
02

Attempt it yourself

Sketch your approach before reading the solution — that's what interviews test.

Nudge consolestandby

Stuck? Beam a request up — the console returns a conceptual nudge that guides your logic without spoiling the implementation.

03

Study the solution

Signals are a fine-grained reactivity primitive: signal() holds a value, computed() derives from signals, and effect() runs side effects when dependencies change. They enable precise, zoneless change detection — Angular re-renders only what actually depends on a changed signal, rather than checking the whole

Solution ready — 2 min read

Classified // press E to declassify

04

Read the code

signal, computed, effect
import { Component, signal, computed, effect } from '@angular/core';

@Component({
  selector: 'app-root',
  standalone: true,
  template: '<button (click)="inc()">count {{ count() }} → doubled {{ doubled() }}</button>',
})
export class AppComponent {
  count = signal(0);
  doubled = computed(() => this.count() * 2);   // derived + memoized

  constructor() {
    effect(() => console.log('count is', this.count())); // reacts to changes
  }
  inc() { this.count.update(c => c + 1); }
}
05

Join the discussion

Discussion (0)

Sign in to join the discussion.

No responses yet. Be the first to share what you think.

Transmission complete // awaiting log

KEEP THE
STREAK ALIVE.

Dossier 109 of 121 decoded in the Angular track. One more won't hurt.

Back to track