You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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
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 areactive()
obj for global state management. internally i use this library/@vue-reactivity/watch
'swatch()
to watch for changes and that works fine. but when importing my lib's global state into a vue project, i wasnt able to usevue
'swatch()
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 thewatch()
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?The text was updated successfully, but these errors were encountered: