[Vuejs]-Problem accessing the vuex mutations from inside of the store/index.js

0👍

Why do you create the store in a function?

const createStore = () => {

I am just doing it like that:

const store = new Vuex.Store({
    state: {},

    mutations: {},

    actions: {},

    modules: {
       auth,
       apps
    },
    strict: debug,
    plugins: debug ? [createLogger()] : []
  })
};

export default store;

And i am able to access store now.

Leave a comment