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

nel_h2
Secure User Management, Made Simple | Frontegg Icon
Secure User Management, Made Simple | Frontegg

Get 7,500 MAUs, 50 tenants, and 5 SSOs free – integrated into your app with just a few lines of code.

Frontegg powers modern businesses with a user management platform that’s fast to deploy and built to scale. Embed SSO, multi-tenancy, and a customer-facing admin portal using robust SDKs and APIs – no complex setup required. Designed for the Product-Led Growth era, it simplifies setup, secures your users, and frees your team to innovate. From startups to enterprises, Frontegg delivers enterprise-grade tools at zero cost to start. Kick off today.
Start for 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