Answer the question
In order to leave comments, you need to log in
Vue refuses to read use to connect Vuex?
Good afternoon. After looking at various topics on connecting, vuex wrote his own file, but when loading the site, an error pops up in the console: Cannot read property 'use' of undefined . It gives the fifth line for an error. What are the options to fix this? VSCode gives this: Property 'use' does not exist on type 'typeof import .
import Vue from 'vue'
import Vuex from 'vuex'
import axios from 'axios'
Vue.use(Vuex);
const store = new Vuex.Store({});
export default store;
Answer the question
In order to leave comments, you need to log in
Why are you squeamish about documentation?
https://next.vuex.vuejs.org/guide/#the-simplest-store
because you are using .use with the class and not with the application instance
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question