0👍
✅
Create a new special action which will dispatch
all the others:
actions: {
FETCH_AB: () => {
// ...
},
FETCH_DS: () => {
// ...
},
FETCH_SD: () => {
// ...
},
// Rest of the actions...
FETCH_ALL: ({ dispatch }) => {
// Dispatch all the actions here
dispatch('FETCH_AB');
dispatch('FETCH_DS');
dispatch('FETCH_SD');
//...
}
}
Source:stackexchange.com