Vuex Persist

screenshot of Vuex Persist
vue

A Vuex plugin to persist the store. (Fully Typescript enabled)

Overview

Vuex-persist is a Vuex plugin that allows you to save your app's state to a persisted storage like Cookies or localStorage. It enables automatic saving of store on mutation, choosing which mutations trigger store save, and supports saving partial store using a reducer function. The plugin also features compatibility with VueJS v2.0 and above, and Vuex v2.1 and above.

Features

  • Distribution Formats: v1.5 is distributed as esm and cjs both, allowing for better tree shaking and module compatibility.
  • Support for Promise Based Stores: Added support for localForage and other Promise based stores.
  • Automatic State Restoration: Automatically restores the store when the app loads.
  • Mutations Trigger: Choose which mutations trigger store save using a filter function.
  • Partial Store Saving: Save some parts of the store to localStorage and some to sessionStorage.
  • Module Support: Works perfectly with modules in the store.
  • Multiple Instances: Create multiple VuexPersistence instances to save different parts of the store to different sources.
vue
Vue

Vue.js is a lightweight and flexible JavaScript framework that allows developers to easily build dynamic and reactive user interfaces. Its intuitive syntax, modular architecture, and focus on performance make it a popular choice for modern web development.

rollup
Rollup

RollupJS is a popular and efficient JavaScript module bundler that takes the code from multiple modules and packages them into a single optimized file, minimizing the overall size of the application and improving its performance.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.