Skip to content

Instantly share code, notes, and snippets.

@eliran-arkabi
Last active July 29, 2018 08:03
Show Gist options
  • Select an option

  • Save eliran-arkabi/7470c6973295316a8810c363cad3d187 to your computer and use it in GitHub Desktop.

Select an option

Save eliran-arkabi/7470c6973295316a8810c363cad3d187 to your computer and use it in GitHub Desktop.
export const state = () => ({
someting: {}
})
export const getters = {
someting (state){
return state.someting
}
}
export const mutations = {
SET_SOMETING (state, someting){
state.someting = someting
}
}
export const actions = {
//load state store
async load ({commit}){
const { data } = await this.$axios.get('/foo')
},
//create
async create ({commit}, payload){
},
//read
read(){
},
//update
async update({commit}, payload){
},
//delete
delete(){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment