store-devtools icon indicating copy to clipboard operation
store-devtools copied to clipboard

Prevent dispatching while undoing/replaying recorded actions

Open pmulac opened this issue 8 years ago • 1 comments

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"?

pmulac avatar Apr 29 '16 19:04 pmulac

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.

codemasterover9000 avatar Jul 24 '18 07:07 codemasterover9000