robinvdvleuten / vuex-persistedstate

💾 Persist and rehydrate your Vuex state between page reloads.
https://npm.im/vuex-persistedstate
MIT License
5.76k stars 378 forks source link

browser.storage support? #363

Closed rendomnet closed 3 years ago

rendomnet commented 3 years ago

Problem description: Fo Firefox and Web extensions we need to use browser.storage instead of Window.localStorage https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/local

How can I use browser.storage with vuex-persistedstate?

robinvdvleuten commented 3 years ago

You can't. The browser.storage API is asynchronous, but the vuex-persistedstate expects synchronous storage.