Getting Started: The Basics of Vuex

Learn why Vuex matters for global state and component communication.

Vuex was, at least until Vue 3 arrived, the standard state machine for Vue. It serves as an app-wide state machine that we can also use across multiple apps on the same page. An example would be if you implemented certain dynamic parts of a server-side rendered application as small Vue apps. These Vue apps can share their state with Vuex, such as user data.

The Flux pattern

Vuex is loosely based on React’s Redux which, in turn, is based on the Flux pattern, which Facebook introduced. Flux solves many problems of classic Model-View-Controller (MVC) in the frontend. In a traditional MVC structure, the View displays data it receives from the Model. For example, we usually use a Controller to update the Model when user input occurs. The Model then informs the View about a change.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy