Open pancake-boy opened 4 years ago
I have the same issue.
Same issue here, found a solution?
Guys, be sure that you have correctly set index.ts. For example:
import Vue from 'vue';
import Vuex from 'vuex'
import VuexPersistence from 'vuex-persist';
Vue.use(Vuex);
const vuexLocal = new VuexPersistence({
storage: window.localStorage,
});
export default new Vuex.Store({
state: {},
plugins: [vuexLocal.plugin],
});
and module like this, when it doesn't have a initial state and you load the state from the localStorage
@Module({ dynamic: true, store: store, name: 'mm', preserveState: localStorage.getItem('vuex') !== null })
Did you solve it? I have the same issue. And I try to add localStorage.getItem('vuex') !== null }, but it not working
i don't use this lib anymore. maybe easier to just store what u need manually
same issue
When i call submitQuote() -> which calls the mutation setQuoteResult(); 'this' is undefined.
But it works when i remove preserveState: true
any ideas?