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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

watching a reactive obj inside a vue app and outside vue #7

Open
spencercap opened this issue Feb 6, 2023 · 0 comments
Open

watching a reactive obj inside a vue app and outside vue #7

spencercap opened this issue Feb 6, 2023 · 0 comments

Comments

@spencercap
Copy link

spencercap commented Feb 6, 2023

hi! fantastic library 馃憦

i wasn't exactly sure where to pose this question, but i thought here might be ok-

i've made a lib that uses @vue/reactivity to create a reactive() obj for global state management. internally i use this library/@vue-reactivity/watch's watch() to watch for changes and that works fine. but when importing my lib's global state into a vue project, i wasnt able to use vue's watch() function or the single-file-component's watch block to check for changes.

however, if i import this lib @vue-reactivity/watch into the frontend and watch the reactive global state obj with that instance of the watch() function it works as expected, but this solve seems redundant as vue already carries this watch function with it and i would love to avoid requiring other devs using my lib to do this work around too. is there some way to resolve this?

@spencercap spencercap changed the title watching a reactive obj instead vue and outside vue watching a reactive obj inside a vue app and outside vue Feb 6, 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

No branches or pull requests

1 participant