Complete Vue.js 2 Web Development_ Practical guide to building end-to-end web development solutions with Vue.js 2

(singke) #1
State Management with Vuex Chapter 21

Awesome! We can see the INCREMENT action as well as a subsequent change to the state


and getters, and more information about the mutation itself. Let's see how we can time
travel throughout our state:


In the preceding screenshot, I've selected the time travel button on the first action. You can


then see that our state is reverted to count: 1, and this is reflected in the rest of the
metadata. The application is then updated to reflect this change in state, so we can literally


step through each action and see the results on screen. Not only does this help with


debugging, but any new state that we add to our application will follow the same process
and be visible in this manner.


Let's hit the commit button on an action:

Free download pdf