Skip to content

Instantly share code, notes, and snippets.

@jeremywynn
Created September 14, 2019 01:54
Embed
What would you like to do?
Before any necessary adjustments
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