Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$digest may be triggered before the actual state change #212

Open
cozmy opened this issue Nov 21, 2018 · 0 comments
Open

$digest may be triggered before the actual state change #212

cozmy opened this issue Nov 21, 2018 · 0 comments

Comments

@cozmy
Copy link

cozmy commented Nov 21, 2018

Triggering the $digest in the middleware is a bad idea as it may happen before the actual state change. It should be triggered in store.subscribe() as this is a change listener which "will be called any time an action is dispatched, and some part of the state tree may potentially have changed".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant