Join GitHub today
silent and ignore any dispatch or commit during time-traveling in the dev mode #1463
What problem does this feature solve?
IMO, time-traveling (or traversing in the event sourcing record) should have no side-effects. Often, I found it is annoying when I "time-traveled", there is a side-effect being performed due to the component life cycle or routing middleware try to do their "regular" task... this resulted in a polluted mutation records... Consider the fact that some component can be delayed rendered by
What does the proposed API look like?
When we click "time travel to the state" in the dev tool, Vuex internally have a mechanism to silent and ignore any dispatch or commit to be performed (or prevent state to be mutated during time-traveling). This locking mechanism can be unlocked if we decide to either revert or traverse to the latest state (they are basically the same). While I have little clue how we are going to implement this or should we have this, after discussed with my colleagues, I think it would be beneficial to open this discussion.
** the reason I post this here is due to the fact that the devTool have to touch the vuex core if we want to have this.