Suggest an editImprove this articleRefine the answer for “How does ChangeDetectionStrategy affect the hooks?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)In Angular, `ChangeDetectionStrategy` determines **when Angular checks the component for changes**, and this affects the calling of the lifecycle hooks related to change detection. **Key point:** ChangeDetectionStrategy affects how often the change-detection hooks are called, but not the initialization and destruction hooks.Shown above the full answer for quick recall.Answer (EN)ImageIn Angular, `ChangeDetectionStrategy` determines **when Angular checks the component for changes**, and this affects the calling of the lifecycle hooks related to change detection: ## Key points 1. **Strategies**: - `Default` - the standard strategy. Angular checks the component and all its child components on **any event, timer, or data change**. - `OnPush` - an optimized strategy. Angular checks the component **only when its input properties (**`@Input`**) change or on events inside the component**. 2. **Effect on the hooks**: - `ngOnChanges()` - called **only when the input properties change**, as usual. - `ngDoCheck()`, `ngAfterContentChecked()`, `ngAfterViewChecked()` - with **OnPush**, they can fire **less often**, because Angular does not run a change check on the component without an explicit change to the input data or an event. - The other hooks (`ngOnInit()`, `ngAfterContentInit()`, `ngAfterViewInit()`, `ngOnDestroy()`) - **always called in the usual order**, regardless of the strategy. 3. **Conclusion**: - With `OnPush`, some change-detection hooks **can fire less often**, which improves performance but requires care when working with data that does not arrive through `@Input`. In other words, **ChangeDetectionStrategy affects how often the change-detection hooks are called, but not the initialization and destruction hooks**.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.