Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Optimistic Offline-First Apps With Vuex
import store from './store';
import { getState } from './storage';
export default function () {
if (store.initialized) {
return Promise.resolve();
return getState()
.then(state => store.commit('loadFromCache', state));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment