pinia-plugin-persistedstate-2

Persist and rehydrate your Pinia state between page reloads
257,084 115
Install
npm install pinia-plugin-persistedstate-2
Latest Version:2.0.32
Vue:3
Older releases:2
License:MIT
Last Updated:Oct 21, 2026
Links: GitHub  ·  npm
Maintainer: iendeavor

pinia-plugin-persistedstate-2

Persist and rehydrate your Pinia state between page reloads.

CI NPM version

Features

  • 🎨 Configurable globally and in every store.
  • 💪 Type Safe
  • 📦 Extremely small

🚀 Getting Started

Installation

# or pnpm or yarn
npm install pinia-plugin-persistedstate-2

Usage

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { createPersistedStatePlugin } from 'pinia-plugin-persistedstate-2'
import App from './App.vue'

const pinia = createPinia()

const persistedStatePlugin = createPersistedStatePlugin({
  // plugin options goes here
})
pinia.use(persistedStatePlugin)

const app = createApp(App)
app.use(pinia)
app.mount('#app')

More examples can be found in the examples folder.

API can be found in the type file.

🤝 Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details

Related Packages

pinia-plugin-capacitor-persist

A Vue 3 Pinia plugin which persists store content using the CapacitorJS Preferen...

21,737 9
pinia-plugin-loading

Auto loading data binding plugin for pinia. You don't need to write showLoading...

1,337 12
pinia-persists

a pinia plugin for state persist.

792 16
pinia-plugin-created

create created lifecycle method in your pinia 🍍 store!

284 0

Version History

Version Released License
2.0.32 MIT
2.0.31 MIT
2.0.30 MIT
2.0.29 MIT
2.0.28 MIT