Vuex Plugin To Persist The Store

A Typescript-ready Vuex plugin that enables you to save the state of your app to a persisted storage like Cookies or localStorage.

Features:

  • Support localForage and other Promise based stores.
  • Fix late restore of state for localStorage.
  • Automatically save store on mutation.
  • Choose which mutations trigger store save, and which don’t, using filter function.
  • Works perfectly with modules in store.
  • Ability to save partial store, using a reducer function.
  • Automatically restores store when app loads.
  • You can create multiple VuexPersistence instances if you want to.

Preview:

Vuex Plugin To Persist The Store

Changelog:

v3.2.0 (09/27/2020)

  • update saved state merging/replacing strategies

v3.1.0 (09/19/2020)

  • BREAKING: replaced lodash.merge with deepmerge (this can cause difference in behaviour on how you expect old state and new state to be merged (especially arrays))

v2.2.0 (08/06/2020)

  • Update

Download Details:

Author: championswimmer

Live Demo: http://championswimmer.in/vuex-persist/

Download Link: https://github.com/championswimmer/vuex-persist/archive/master.zip

Official Website: https://github.com/championswimmer/vuex-persist

Install & Download:

# Yarn
$ yarn add vuex-persist

# NPM
$ npm install vuex-persist --save

Add Comment