Introduction

Get to know what we will cover in this chapter and learn when to use Vuex in Vue applications.

We'll cover the following

Vuex is an official library for global state management in Vue applications.

This chapter isn’t a thorough introduction, because we should have at least basic knowledge of Vuex’s work. In this chapter, we want to share useful patterns and practices to make it easier to use and manage the Vuex store. In this chapter, we’ll cover:

  1. When to use Vuex.
  2. Using constant types to avoid typos.
  3. How to automate importing and registration of Vuex modules.
  4. How to manage API state with Vuex.
  5. Automatic module scaffolding with a custom script.

Get hands-on with 1200+ tech skills courses.