Vuex-persistedstate
lastmod 2026-11-10created 2021-07-123 edits
vuex-persistedstate is a Vuex plugin that automatically saves the Vuex store's state to browser storage and restores it even after a page reload. It uses localStorage by default, can be switched to sessionStorage or cookies with the storage option, and the paths option lets you pick only the modules or keys to save so that only values that must persist, such as login tokens and user settings, are kept. In Vue 3 and Pinia environments, pinia-plugin-persistedstate plays the same role.
Persist and rehydrate your Vuex state between page reloads.