You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.
I tried the Default Declation of createPersistedState() , localstorage works fine...
But I Need to Use Cookies , But I Cant See The Cookie can someone help me with this
import { Store } from 'vuex'
import createPersistedState from 'vuex-persistedstate'
import * as Cookies from 'js-cookie'
/* Add Below All Your Modules */
import auth from './modules/auth'
import permission from './modules/permission'
export default new Store({
modules: {
auth,
permission
// add modules here
},
plugins: [createPersistedState({
key: App.site.trademark,
// Declare All The State We Want to Persist
paths: ['auth.isLoggedIn'],
storage: {
getItem: key => Cookies.get(key),
setItem: (key, value) => Cookies.set(key, value, { expires: 3, secure: true }),
removeItem: key => Cookies.remove(key)
}
})]
})
The text was updated successfully, but these errors were encountered:
codeitlikemiley
changed the title
How to use this on a Module Namespace Vuex?
Cant Use Cookie For Vuex Module Namespace
Sep 25, 2017
I tried the Default Declation of createPersistedState() , localstorage works fine...
But I Need to Use Cookies , But I Cant See The Cookie can someone help me with this
The text was updated successfully, but these errors were encountered: