https://angular.love/running-change-detection-preventing-autorun #448
Replies: 1 comment
-
I recently migrated a large application from the default change detection strategy to OnPush. This involved manually updating each component to use ChangeDetectionStrategy.OnPush and adding the necessary calls to markForCheck() or detectChanges() where appropriate. The application makes heavy use of libraries like ECharts and Leaflet, which rely on native browser events. This made my case ideal for testing the claims in the article I was referencing. This is because OnPush doesn’t trigger change detection for native browser events (like those used by ECharts and Leaflet), similar to what happens when running code outside Angular. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://angular.love/running-change-detection-preventing-autorun
Angular.love - a place for all Angular enthusiasts created to inspire and educate.
https://angular.love/running-change-detection-preventing-autorun
Beta Was this translation helpful? Give feedback.
All reactions