Angular OnPush Change Detection - Avoid Common Pitfalls
https://blog.angular-university.io/onpush-change-detection-how-it-works/
Scenario 1 - Our Starting PointDefault Change Detection and Object MutabilityOnPush Change Detection and Direct Object MutabilityOnPush Change Detection and Event HandlersScenario 2 - OnPush and ObservablesScenario 3 - Passing Observables as @Inputs() to A OnPush ComponentConclusionsOther Posts on Angular Is there any other way that OnPush could know that the component needs to be re-rendered? Notice that inside the newsletter component there is a button with a click handler. If we click on the "Subscribe" button, we will see that now the template shows "Hi Bob", so the triggering of event handlers inside the component itself also causes the on push...
Is there any other way that OnPush could know that the component needs to be re-rendered? Notice that inside the newsletter component there is a button with a click handler. If we click on the "Subscribe" button, we will see that now the template shows "Hi Bob", so the triggering of event handlers inside the component itself also causes the on push...
DA: 19 PA: 32 MOZ Rank: 41