Introduction

In this chapter, you will learn how Vuex works and how to use it to support a scalable application. Vuex implements a pattern that is popular in frontend frameworks and consists of dividing the different concerns to manage a big global application state. The mutations are the only things that can change the state, so you have only one place to look for that. Much of the logic, along with all the asynchronous logic, is contained in the actions; finally, getters and modules further help to spread the cognitive load when it comes to computing the derived state and splitting your code into different files.

Along with recipes, you will find grains of wisdom that I found useful when developing real large applications; some have to ...

Get Vue.js 2 Cookbook 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.