vuex-state-storage-sync
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published
logo

Vuex State and Storage(local, session) Synchronization module

NPM Version Package License Release Version NPM Downloads


🕹Guide

Install

$ npm install --save vuex-state-storage-sync

Usage

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

💳 License

MIT

Package Sidebar

Install

npm i vuex-state-storage-sync

Weekly Downloads

44

Version

1.0.0

License

MIT

Unpacked Size

67.9 kB

Total Files

15

Last publish

Collaborators

  • limkyungmin