What does zoneless change detection mean, and how does Angular know when to update the screen without Zone.js?
Short answer
Zoneless change detection removes Zone.js entirely and instead relies on more explicit and precise signals, like Angular Signals, to tell Angular exactly which parts of the application changed, so it only needs to update the specific pieces of the screen affected instead of…
Advertisement
AModel answer
Zoneless change detection removes Zone.js entirely and instead relies on more explicit and precise signals, like Angular Signals, to tell Angular exactly which parts of the application changed, so it only needs to update the specific pieces of the screen affected instead of checking everything.
// main.ts
import { bootstrapApplication } from '@angular/platform-browser';
import { provideExperimentalZonelessChangeDetection } from '@angular/core';
bootstrapApplication(AppComponent, {
providers: [provideExperimentalZonelessChangeDetection()]
});Real-world example
A performance sensitive dashboard app switches to zoneless change detection and signals, and notices faster rendering because Angular now updates only the specific counters that changed instead of scanning the entire component tree after every event.
Likely follow-ups
- Do you have to rewrite an entire app to switch to zoneless change detection?
- What happens to code that still uses regular variables instead of signals in a zoneless app?
Related topics