๐ Microtask Queue + RxJS + Angular: How it works
#angular #ngZone #microTask #macroTask
In the context of Angular, the framework doesnโt directly use the root zone. Instead, Angular creates its specialized zone by forking the root zone.
This forked zone, known as NgZone or sometimes referred to as the "inner zone," is augmented with Angular-specific behaviors. It's within this NgZone that Angular tracks changes and decides when to run its change detection.
The ability to fork zones and create this hierarchical structure is powerful. It allows for modular and layered tracking of asynchronous operations.
For instance, while the root zone might provide basic tracking, child zones (like NgZone) can introduce application-specific behaviors without affecting the broader tracking mechanisms.
In Angularโs case, the NgZone ensures that the framework can efficiently track changes and update the UI, building upon the foundational capabilities of the root zone.
โ Article link: https://itnext.io/microtask-queue-rxjs-angular-ac3d8612d3f6
#angular #ngZone #microTask #macroTask
In the context of Angular, the framework doesnโt directly use the root zone. Instead, Angular creates its specialized zone by forking the root zone.
This forked zone, known as NgZone or sometimes referred to as the "inner zone," is augmented with Angular-specific behaviors. It's within this NgZone that Angular tracks changes and decides when to run its change detection.
The ability to fork zones and create this hierarchical structure is powerful. It allows for modular and layered tracking of asynchronous operations.
For instance, while the root zone might provide basic tracking, child zones (like NgZone) can introduce application-specific behaviors without affecting the broader tracking mechanisms.
In Angularโs case, the NgZone ensures that the framework can efficiently track changes and update the UI, building upon the foundational capabilities of the root zone.
โ Article link: https://itnext.io/microtask-queue-rxjs-angular-ac3d8612d3f6