21
State Management with Vuex
In this chapter, we'll be looking at State Management Patterns with Vuex. Vuex may not be
needed for every application created, but it is extremely important that you have an
understanding of what it is when it becomes appropriate to use it, and how to implement it.
By the end of this chapter, you will have done the following:
Understood what Vuex is and why you should use it
Created your first Vuex store
Investigated actions, mutations, getters, and modules
Used the Vue devtools to step through Vuex mutations as they happen
What is Vuex?
State management is an important part of modern-day web applications, and managing
this state as the application grows is a problem every project faces. Vuex looks to help us
achieve better state management by enforcing a centralized store, essentially a single source
of truth within our application. It follows design principles similar to that of Flux and
Redux and also integrates with the official Vue devtools for a great development
experience.