Skip to content

Instantly share code, notes, and snippets.

@mikeapr4
Last active May 1, 2019 18:59
Show Gist options
  • Save mikeapr4/509e93bb789f84858de66787b7a9111f to your computer and use it in GitHub Desktop.
Save mikeapr4/509e93bb789f84858de66787b7a9111f to your computer and use it in GitHub Desktop.
actions: {
async loadBooks({ commit }) {
commit('startLoading');
const response = await get('/api/books');
commit('setBooks', response.data.books);
commit('stopLoading');
},
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment