-
Notifications
You must be signed in to change notification settings - Fork 5
Configurable storage method #11
Comments
Yeah async is going to be in an issue. The challenge of this package is avoiding a flash of an incorrect theme, so it needs to be synchronous, or else you need to hide all the content and wait for it. |
I've thought about that but wasn't sure it'd be an issue, are you sure there's no way around it? |
So I have managed to bolt Maybe I'd use it directly if my project used svelte but as I've stated already, my addon is vue-based (😢). EDIT: or I could just use PDM as-is, sure theme preferences will be erased if for example the user deletes their browser data (to which |
I'd like to use the WebExtension storage instead of
localStorage
to store the current theme in my vue-based browser addon.I've managed to come up with a solution using some composables from VueUse (and a few of my own, modeled after theirs) but it isn't as smooth as with this package so I'll fork this repo and try to hack on it.
Since the storage backend I want to use is async it does present an issue, but I think just wrapping the
.get/.set/.remove
calls in asetTimeout
should work.The text was updated successfully, but these errors were encountered: