Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: storage reactivity #157

Merged
merged 1 commit into from
Dec 18, 2023
Merged

fix: storage reactivity #157

merged 1 commit into from
Dec 18, 2023

Conversation

djfhe
Copy link
Contributor

@djfhe djfhe commented Dec 14, 2023

Description

Fixes storage reactivity by reimplementing useAsyncStorage from vueuse and replacing the storage listener on window by a custom one using the polyfill webextension storage API.

Linked Issues

fix #111

Additional Context

The missing reactivity is very noticeable and anoying if u have a background worker changing any data in the storage. This PR should fix that. In the long term, it might be better to address this issue by exposing additional options in useAsyncStorage.
#151 and this PR will conflict with each other, so some conflict resolving of either one will be required.

Fixes storage reactivity by reimplementing useAsyncStorage from vueuse
and replacing the storage listener on window by a custom one using the
polyfill webextension storage API.
@tmkx
Copy link
Collaborator

tmkx commented Dec 18, 2023

LGTM

@tmkx tmkx merged commit 0ec9dfe into antfu-collective:main Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage reactivity
2 participants