What is ChangeDetectionStrategy.OnPush and when should you use it?

Entry Angular

Answer

OnPush change detection checks a component only when its input reference changes, an event occurs, or an observable emits.

It improves performance in large, data-heavy applications by reducing unnecessary change detection cycles.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice