Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

my state is not persisted after page refresh #265

Open
AnilkrishnaD opened this issue Mar 7, 2023 · 1 comment
Open

my state is not persisted after page refresh #265

AnilkrishnaD opened this issue Mar 7, 2023 · 1 comment

Comments

@AnilkrishnaD
Copy link

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
Copy link

#259 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants