ngrx / store-devtools

Developer Tools for @ngrx/store
MIT License
325 stars 38 forks source link

Prevent dispatching while undoing/replaying recorded actions #16

Open pmulac opened 8 years ago

pmulac commented 8 years ago

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 commented 6 years ago

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.