Skip to main content

What is the difference between Angular’s Default and OnPush Change Detection Strategies?

Junior Angular
Quick Answer Default strategy: Angular checks every component on every change detection cycle (conservative but can be slow for large trees). OnPush strategy: Angular skips a component unless its @Input references changed, an event fired from it, or async pipe received new value. OnPush is a performance contract - you tell Angular "I'll manage state immutably so you can skip me." Requires discipline with data mutation.

Answer

Default Strategy: Angular checks all components, even if data has not changed.

OnPush Strategy: Angular checks only when input references change, observables emit, or events occur.

OnPush improves performance, especially in complex apps.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

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