WATCH NEXT: Angular Interview Questions and Answers - Dominate Your Next Interview - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5A_YKlVWMPo.htmlsi=2DCn7yspEAAJ2H6l
I'm so glad I ran into a Reddit comment that led me here. I've been writing Angular 10 close to 2 years and still haven't had clear understanding on CD, Zone.js, and OnPush. I'm excited for the changes to latest Angular.
Thank you so much for this video! I subscribed. I did have two questions: 1. at timestamp 6:30, we see that the rightmost component with a shield updates its immediate left child even though that left child is NOT marked dirty. Is that because as you say, "when our parent component is updated, we also update all children". So any child component of an updated parent component will get updated UNLESS... that child component uses onPush change detection strategy AND that child is NOT marked dirty? 2. at timestamp 8:30, were you ultimately saying that using async pipe within our HTML is more time efficient than changing data fields within the component classes stored within our .ts files?
1. Angular updates all components every time when they or their parents don't have onPush 2. I didn't say that. It compares detectChanges vs markForCheck. First if immediate force detect which second does marking dirty which leads to the detect changes when onMicrotaskEmpty is finished. As you can see async pipe just do markForCheck.