Chapter 10. Vuex
This chapter covers
- Understanding state
- Using getters
- Implementing mutations
- Adding actions
- Working with Vuex helpers
- Learning about project setup and modules
In chapter 9, we looked at ways we could extend Vue.js and reuse part of its functionality without repeating code. In this chapter, we’ll look at how we store data in our application and how that data is shared between components. One of the preferred ways of sharing data in an application is by using a library called Vuex. Vuex is a state-management library that helps create a centralized store that can be shared with all the components in the application.
We’ll begin by looking at when we should use Vuex and when we shouldn’t. Certain applications benefit more from ...
Get Vue.js in Action 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.