For this exercise, we will use a single-file component skeleton to build some simple Vue apps with Vuex. We will put all our sample code in /chapter-10/vue/vuex-sfc/ in our GitHub repository. Let's get started.
Before we can create a Vuex store, we must install Vuex and import it using the following steps:
- Install Vuex by using npm:
$ npm i vuex
- Import and register...