Skip to content

Instantly share code, notes, and snippets.

@idoshamun
Created Oct 9, 2018
Embed
What would you like to do?
Optimistic Offline-First Apps With Vuex
const plugin = (store) => {
store.subscribe((mutation, state) => {
switch (mutation.type) {
case '...':
// dispatch request
break;
case '...':
// dispatch request
break;
default:
// Ignore default case
}
});
};
export default plugin;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment