championswimmer / vuex-persist

A Vuex plugin to persist the store. (Fully Typescript enabled)
http://championswimmer.in/vuex-persist
MIT License
1.67k stars 116 forks source link

my state is not persisted after page refresh #265

Open AnilkrishnaD opened 1 year ago

AnilkrishnaD commented 1 year ago

i am using in vite+vue app and this is my code import { createStore } from "vuex"; import VuexPersistence from "vuex-persist"; // import createPersistedState from "vuex-persistedstate"; // import Cookies from "js-cookie"; import state from "./state.js"; import as actions from "./actions.js"; import as mutations from "./mutations.js"; import * as getters from "./getters.js"; const vuexLocal = new VuexPersistence({ storage: window.localStorage, });

const store = createStore({ state, actions, mutations, getters, plugins: [new VuexPersistence().plugin], });

export default store;

nsano-rururu commented 1 year ago

https://github.com/championswimmer/vuex-persist/issues/259#issuecomment-1648003083