0👍
Looks like this problem is in implementation of saving\retrieving store from localStorage. I suggest you to not re-invent the wheel and use this package instead which will solve your problem:
https://www.npmjs.com/package/vuex-persistedstate
import createPersistedState from 'vuex-persistedstate'
const store = new Vuex.Store({
// ...
plugins: [createPersistedState()]
})
- [Vuejs]-Vue JS Multiple filters, one array
- [Vuejs]-How insert multiple value in Intermediate table through API
0👍
You should try import store before router like
import Vue from 'vue';
import router from './router';
import store from './store';
import App from './App.vue';
new Vue({
store,
router,
render: (h) => h(App)
}).$mount('#app');
Source:stackexchange.com