Seb-L / pinia-plugin-persist

Persist pinia state data in sessionStorage or other storages.
https://Seb-L.github.io/pinia-plugin-persist/
MIT License
214 stars 37 forks source link

Async storage provider #35

Open thuna-garry opened 2 years ago

thuna-garry commented 2 years ago

Is there any intent to be able to support an async storage provider like localforage?

import localforage from 'localforage'

export default {
    setItem: async (key, value) => {
      return localforage.setItem(key, value)
    },
    getItem: async (key) => {
      return localforage.getItem(key)
    }
}

I did try the above without any success.

jontybrook commented 2 years ago

I would like this too!

marchalb commented 2 years ago

me too

picasocro1 commented 1 year ago

Me too! Can't use the indexDb storage without that actually :(