Skip to content

soc221b/pinia-plugin-persistedstate-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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