Getting ready

Mutations are the building blocks of actions, so it's highly suggested you complete the preceding recipe before trying this.

We will be using the setup from the Building a simple storage for the application state recipe; you can use your own as well, but in any case this recipe is based on a slight modification of the official Webpack template.

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.