@storix-js/persist
v0.2.1
Published
Persistence plugin for Storix with `localStorage` and `indexedDB` backends.
Readme
@storix-js/persist
Persistence plugin for Storix with localStorage and indexedDB backends.
Install
npm install @storix-js/core @storix-js/persistUsage
import { createStorix } from '@storix-js/core';
import { persistPlugin } from '@storix-js/persist';
const storix = createStorix({
plugins: [
persistPlugin({ storage: 'localStorage', debounce: 100 })
]
});Use storage: 'indexedDB' for larger or more durable client-side state.
