Skip to content

Instantly share code, notes, and snippets.

@jeremywynn jeremywynn/loading.js Secret
Created Sep 14, 2019

Embed
What would you like to do?
Finished
export const state = () => ({
// Loading
loading: false,
});
export const mutations = {
// Loading
END_BUSY_STATE(state) {
state.loading = false;
},
START_BUSY_STATE(state) {
state.loading = true;
},
};
export const actions = {
// Loading
stopBusyState({ commit }) {
commit("END_BUSY_STATE");
},
triggerBusyState({ commit }) {
commit("START_BUSY_STATE");
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.