This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// actions | |
export const SET_USER = 'SET_USER' | |
export const SET_USER_LOCATION = 'SET_USER_LOCATION' | |
// mutations | |
// getters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// userModule.js | |
export const SET_USER = 'SET_USER' | |
export const SET_USER_LOCATION = 'SET_USER_LOCATION' | |
const userModule = { | |
namespaced: true, | |
state: () => ({}), | |
mutations: {}, | |
actions: { | |
[SET_USER]() {}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userModule = { | |
namespaced: true, | |
state: () => ({}), | |
mutations: {}, | |
actions: { | |
'SET_USER'() {}, | |
'SET_USER_LOCATION'() {} | |
}, | |
getters: {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userModule = { | |
namespaced: true, | |
state: () => ({}), | |
mutations: {}, | |
actions: {}, | |
getters: {} | |
} | |
const organisationModule = { | |
namespaced: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Vuex from 'vuex' | |
Vue.use(Vuex) | |
const store = new Vuex.Store({ | |
state: { | |
count: 0 | |
}, | |
mutations: { |
NewerOlder