1.0.0 • Published 3 years ago

@eb3n/pinia-plugin-persist v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@eb3n/pinia-plugin-persist

Persists pinia data in localStorage.

Installation

Install the package:

# yarn
yarn add -D @eb3n/pinia-plugin-persist

# npm
npm i -D @eb3n/pinia-plugin-persist

Import and install:

// main.ts
import { createPinia } from 'pinia'
import { piniaPersist } from '@eb3n/pinia-plugin-persist'

const pinia = createPinia()
pinia.use(piniaPersist)

Enable the plugin per store:

export const useStore = defineStore({
  id: '...',

  state: () => ({ ... }),

  actions: { ... },

  getters: { ... },

  persist: true
})
1.0.0

3 years ago

1.0.0-alpha.0

3 years ago

0.0.2-testing.1

3 years ago

0.0.2-testing.0

3 years ago

0.0.2-testing

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago