© Brett Nelson 2018
Brett NelsonGetting to Know Vue.jshttps://doi.org/10.1007/978-1-4842-3781-6_7

7. State Management

Brett Nelson1 
Eagan, Minnesota, USA

Every application has some data to manage in the form of values to keep track of related to the user’s choices or the information that is being displayed. To further complicate things, we could be using the same data across multiple instances of Vue. Handling this is called state management. We will take a look at three ways to manage state with Vue: a simple data object, a do-it-yourself data store, and a state management library called Vuex.

Simple Data Objects

The most basic way to manage and share data is with a simple JavaScript object that has some properties with values. This object is ...

Get Getting to Know Vue.js: Learn to Build Single Page Applications in Vue from Scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.