What is mapState?

mapState is a helper that simplifies creating a computed property that reflects the value of a given state . Similarly: mapGetters is a helper that simplifies creating a computed property that reflects the value returned by a given getter.

Read more

How do I import Vuex?

Import the file in your Vue app(main.js) js import Vue from “vue”; //import the store module import store from “@/store”; // Make sure to inject the store in the vue instance new Vue({ store, render: h => h(App) }). $mount(“#app”); That’s it! Now restart your Vue CLI project and it should all work fine.

Read more