Persist and rehydrate your Vuex state between page reloads. New plugin instances can be created in separate files, but must be imported and added to plugins object in the main Vuex file. It is possible to use vuex-persistedstate with Nuxt.js. It must be included as a NuxtJS plugin. Provides an array of any paths to partially persist the state. If no paths are given, the complete state is persisted. If an empty array is given, no state is persisted. Paths must be specified using dot notation. If using modules, include the module name. If it's not ideal to have the state of the Vuex store inside local storage, one can easily implement the functionality to use cookies for that (or any other you can think of). Any object following the Storage protocol (getItem, setItem, removeItem, etc) could be passed. If you need to use Local Storage (or you want to) but want to prevent attackers from easily inspecting the stored data, you can obfuscate it.

Features

  • The UMD build is also available on unpkg
  • New plugin instances can be created in separate files
  • It is possible to use vuex-persistedstate with Nuxt.js
  • Options provided to configure the plugin for your specific needs
  • Reduce the state to persist based on the given paths
  • Setup mutation subscription

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow vuex-persistedstate

vuex-persistedstate Web Site

Other Useful Business Software
Go From AI Idea to AI App Fast Icon
Go From AI Idea to AI App Fast

One platform to build, fine-tune, and deploy ML models. No MLOps team required.

Access Gemini 3 and 200+ models. Build chatbots, agents, or custom models with built-in monitoring and scaling.
Try Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of vuex-persistedstate!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript User Interface (UI) Software, JavaScript Browser Extensions and Plugins

Registered

2021-10-25