Skip to content

Dispatch an action outside of ngZone #105

@s-uds

Description

@s-uds

This is a...

  • feature request
  • bug report
  • usage question

What toolchain are you using for transpilation/bundling?

  • @angular/cli
  • Custom @ngTools/webpack
  • Raw ngc
  • SystemJS
  • Rollup
  • Other

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:

(Originally posted here: angular-redux/store#565)

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/platform/blob/master/packages/store/src/components/root-store.ts#L84).

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

Is there any known workaround for this? Could it be featured as an additional option (like: ngxs/store#487 (comment))

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions