-
-
Save mtermoul/5996cf4e08f7e33876aaa31f50c468d0 to your computer and use it in GitHub Desktop.
store-locator state management with vuex
This file contains 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' | |
import VueResource from 'vue-resource' | |
import Cosmic from '../api/cosmic' | |
Vue.use(Vuex) | |
Vue.use(VueResource) | |
export default new Vuex.Store({ | |
state: { | |
userLocation: {}, | |
selectedLocation: {}, | |
selectedStore: null, | |
availableLocations: {}, | |
stores: [] | |
}, | |
getters: { | |
... | |
}, | |
mutations: { | |
... | |
}, | |
actions: { | |
... | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment