State Management with Vuex
Learn state management using Vuex and see how we can share data and ensure a single source of truth.
We'll cover the following
Introduction
Vuex is a state management pattern and library for Vue.js applications. It serves as a centralized store for all the components in an application, with rules ensuring that the state can only be mutated in a predictable fashion.
When we created our application using the vue create educative-whatsapp-application
command in the lesson “Structuring Vue.js Application,” we selected Vuex, which automatically configured Vuex for us. Simply put, Vuex is a store we can use within the application. We can use the following example to get started with Vuex. The core concepts of Vuex are:
- State
- Getters
- Mutations
- Actions
- Modules
Get hands-on with 1400+ tech skills courses.