Slide 36
Slide 36 text
import * as actions from './actions.js';
import * as mutations from './mutations.js';
import * as getters from './getters.js';
// Store main
export const createStore = async(Vue) => {
const { default: Vuex } = await import(/* webpackChunkName: "vuex" */ 'vuex');
Vue.use(Vuex);
return new Vuex.Store({
state: {
csrf: null,
gqlToken: null,
outbreakSlug: null,
outbreakDetail: null,
states: null,
vehicles: null,
searchForm: null,
organisms: null,
outbreaks: null,
months: null,
countries: null,
},
getters,
mutations,
actions,
modules: {}
});
}; store.js