Angular OnPush – A Change Detection Strategy Revealing Mistakes in Your Code

When optimizing the performance of Angular applications, many developers directly associate Angular’s OnPush change detection strategy with it. But, if you don’t know exactly how OnPush works under the hood, it will quickly teach you what you are doing wrong the hard way.
In this article, we’ll look deeper into how the OnPush strategy affects Angular’s change detection mechanism and which pitfalls we should avoid at all costs.