question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[NgZone] shouldCoalesceChangeDetection option results in infinite change detections

See original GitHub issue

The shouldCoalesceChangeDetection option added in https://github.com/angular/angular/pull/39422 results in infinite change detections done as a requestAnimationFrame.

Repro

Repro: https://stackblitz.com/edit/angular-1ucpvz

This happens in an empty Angular app just by turning on the option:

platformBrowserDynamic()
  .bootstrapModule(AppModule, {
    ngZoneRunCoalescing: true
  })

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
mleibmancommented, May 3, 2021

That said, given that the option exists but doesn’t work correctly in Angular 11, shouldn’t it be merged there?

1reaction
AndrewKushnircommented, Apr 30, 2021

since the PR #40540 is target: minor, so it will not be included in the Angular 11 release, is that correct?

@JiaLiPassion yes, the mentioned changes was merged Feb 22 after v11.2.0 was released (Feb 11), so the change would be released in v12.0.0.

@mleibman the change that @JiaLiPassion refers to was already merged into Google’s codebase. Do you experience this issue in an internal project or external?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Boosting performance of Angular applications with manual ...
Angular uses NgZone/Zone.js to know when to trigger UI update (change detection) when our app data state changes. It brilliantly utilized the events...
Read more >
The Curious Case of Angular and the Infinite Change Event ...
We set the Angular change detection strategy from ChangeDetectionStrategy.Default (look for changes everywhere) to ChangeDetectionStrategy.
Read more >
NgZone - Angular
This guide describes how to use Angular's NgZone to automatically detect ... The result of change detection is that the DOM is updated...
Read more >
Optimizing Angular Change Detection Triggered by DOM Events
The second option is to run the event outside of the Angular zone. We can do so by obtaining a reference to NgZone...
Read more >
Change detection: Getting in the (Angular) zone! - Educative.io
Who knew that an event binding in one component could cause a display bug in another? We will explain the issue before showing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found