robinvdvleuten / vuex-persistedstate

💾 Persist and rehydrate your Vuex state between page reloads.
https://npm.im/vuex-persistedstate
MIT License
5.76k stars 378 forks source link

Hide/change vuex key ls. #318

Closed uwejan closed 4 years ago

uwejan commented 4 years ago

Hi. Am using latest version of npm and vuex-persistedstate. gnome-shell-screenshot-YODAQ0 The image shows that on my localStorage tab on dev console. there is vuex key, i was wondering if there is a way to change it. Thanks.

robinvdvleuten commented 4 years ago

Just pass in a different key name as option when creating a new plugin instance.

import createPersistedState from 'vuex-persistedstate'

export default ({store}) => {
  createPersistedState({
    key: 'customkey',
  })(store)
}