Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Prevent dispatching while undoing/replaying recorded actions #16

Open
pmulac opened this issue Apr 29, 2016 · 1 comment
Open

Prevent dispatching while undoing/replaying recorded actions #16

pmulac opened this issue Apr 29, 2016 · 1 comment

Comments

@pmulac
Copy link

pmulac commented Apr 29, 2016

Let's say I have a form (ControlGroup) and I have subscribed to its valueChanges observable. Each time the form's value changes, I dispatch an action to update the state of my form in the store.

The problem arises for me when I want to debug with the ngrx/devtools. If I undo/replay any of the recorded form update actions, the form detects the change and fires another action that clutters up my action history.

Is there a known method to deal with this type of thing? Perhaps there could be a toggle setting on the devtools component to prevent dispatches while "time traveling"?

@codemasterover9000
Copy link

I am having this problem with router-store. The router navigation instantiates new components that wil dispatch a actions on initialisation. For example load data actions.

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

No branches or pull requests

2 participants