You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ngrx/component uses changeDetectorRef.detectChanges in zoneless mode. This method will synchronously run change detection which can cause performance issues.
For example, the following component will be rerendered 3 times when "Emit new value" button is clicked:
because the changeDetectorRef.detectChanges will be called 3 times under the hood.
As a solution, we can use the θmarkDirty function to trigger the change detection in zoneless mode. Also, the rendering strategy in zoneless mode will be "global" with θmarkDirty. This will make the rendering strategy consistent in both zoneless and zonefull mode.
The text was updated successfully, but these errors were encountered:
Closes#3342
BREAKING CHANGES:
The native local rendering strategy is replaced by global
in zone-less mode for better performance.
BEFORE:
The change detection is triggered via `changeDetectorRef.detectChanges`
in zone-less mode.
AFTER:
The change detection is triggered via `ɵmarkDirty` in zone-less mode.
@ngrx/component
useschangeDetectorRef.detectChanges
in zoneless mode. This method will synchronously run change detection which can cause performance issues.For example, the following component will be rerendered 3 times when "Emit new value" button is clicked:
because the
changeDetectorRef.detectChanges
will be called 3 times under the hood.As a solution, we can use the
θmarkDirty
function to trigger the change detection in zoneless mode. Also, the rendering strategy in zoneless mode will be "global" withθmarkDirty
. This will make the rendering strategy consistent in both zoneless and zonefull mode.The text was updated successfully, but these errors were encountered: