angular-redux / store

Angular 2+ bindings for Redux
MIT License
1.34k stars 205 forks source link

Dispatch an action outside of ngZone #565

Closed s-uds closed 4 years ago

s-uds commented 4 years ago

This is a...

What toolchain are you using for transpilation/bundling?

Environment

NodeJS Version: 13.1.0 Typescript Version: 3.4.5 Angular Version: 8.2.8 @angular-redux/store version: 10.0.0 @angular/cli version: 8.3.6 OS: macOS Mojave

Expected Behaviour:

Hi,

I noticed that dispatch() checks if in the Angular zone or not and always calls ngZone.run if not (source: https://github.com/angular-redux/store/blob/master/src/components/root-store.ts#L83).

However, I wish to dispatch an action from a zone.runOutsideAngular() statement (much like described here: https://github.com/ngxs/store/issues/487)

Is there any known workaround for this? Could it be featured as an additional option (like: https://github.com/ngxs/store/issues/487#issuecomment-453637688)

Thanks a lot!

s-uds commented 4 years ago

Realizing this repository is deprecated, I duplicated the issue to the appropriate repo.