1.0.0 β’ Published 5 years ago
vuex-state-storage-sync v1.0.0
Vuex State and Storage(local, session) Synchronization module
πΉGuide
Install
$ npm install --save vuex-state-storage-syncUsage
import Vue from 'vue';
import Vuex from 'vuex';
import syncStateStorage from 'vuex-state-storage-sync';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
// ...
},
getters: {
// ...
},
mutations: {
// ...
},
actions: {
// ...
},
modules: {
// ...
}
plugins: [
syncStateStorage({
storage: window.localStorage || window.sessionStorage, // Storage Types
key: '', // Storage Key Name
path: [''] // State data to be synchronized to storage
})
]
});π¬ Recommended Commit Message
| When | Commit Message |
|---|---|
| Add function | feat: β‘οΈ Add function |
| Fix bug | fix: π Fix bug |
| Refactoring | refactor: π Refactoring |
| Add package | package: π¦ Add package |
| Fix readme | docs: π Fix readme |
| Improvements style | style: π Improvements style |