prazdevs / pinia-plugin-persistedstate

💾 Configurable persistence and rehydration of Pinia stores.
https://prazdevs.github.io/pinia-plugin-persistedstate/
MIT License
2.1k stars 121 forks source link

how to use in uniapp #198

Closed Rain-Hsiang closed 1 year ago

Rain-Hsiang commented 1 year ago

Clear and concise description of the problem

uniapp里可以么 how to use in uniapp

Suggested solution

但是,pinia-plugin-unistorage的start太少了 pinia-plugin-unistorage

Alternative

pinia-plugin-unistorage

Additional context

No response

Validations

emeiziying commented 1 year ago
import { createPersistedState } from 'pinia-plugin-persistedstate';
import { localStorage } from 'mp-storage';

const pinia = createPinia();
  pinia.use(
    createPersistedState({
      storage: localStorage,
    }),
  );
prazdevs commented 1 year ago

I don't really understand what the problem is here ? Do we have a solution ? (or multiple?)

prazdevs commented 1 year ago

closing as stale.