If you think ngDoCheck
means your component is being checked — read this article
#101
maxkoretskyi
started this conversation in
Article discussion
Replies: 1 comment 1 reply
-
Thanks a lot for the article! But I`m interested in whether its possible to change this: ngOnChanges() { ngDoCheck() { To this: ngOnChanges(changes: SimpleChanges) { ngDoCheck() { Just simply remove ngDoCheck and check object mutation just in ngOnChanges ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In this article I'll explain in great detail when is ngDoCheck triggered which will make it clear why ngDoCheck lifecycle hook is still triggered for a component that implements OnPush change detection strategy.
Read the article here.
Beta Was this translation helpful? Give feedback.
All reactions