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

You Might Also Like
Bright Data - All in One Platform for Proxies and Web Scraping Icon
Bright Data - All in One Platform for Proxies and Web Scraping

Say goodbye to blocks, restrictions, and CAPTCHAs

Bright Data offers the highest quality proxies with automated session management, IP rotation, and advanced web unlocking technology. Enjoy reliable, fast performance with easy integration, a user-friendly dashboard, and enterprise-grade scaling. Powered by ethically-sourced residential IPs for seamless web scraping.
Get Started
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