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
@vue/reactivity is a great package to use as a foundation for a custom component based framework.
With the help of effectScope and onScopeDispose, one can build quite a robust system.
Unfortunately, if such a system tries to use existing reactivity libraries from the vue ecosystem, for instance VueUse, this will fail. VueUse is using lifecycle methods from vue that do not have a non-component-coupled version. Because of this, a system that is only built on @vue/reactivity, can not use it.
I propose to add these APIs to @vue/reactivity (like watch and onScopeDispose in the past) and make it more component system agnostic. When this would be done, other packages could follow and move more dependencies from vue to @vue/reactivity. This way, systems that build upon @vue/reactivity would benefit.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
@vue/reactivity is a great package to use as a foundation for a custom component based framework.
With the help of effectScope and onScopeDispose, one can build quite a robust system.
Unfortunately, if such a system tries to use existing reactivity libraries from the vue ecosystem, for instance VueUse, this will fail. VueUse is using lifecycle methods from vue that do not have a non-component-coupled version. Because of this, a system that is only built on @vue/reactivity, can not use it.
I propose to add these APIs to @vue/reactivity (like watch and onScopeDispose in the past) and make it more component system agnostic. When this would be done, other packages could follow and move more dependencies from vue to @vue/reactivity. This way, systems that build upon @vue/reactivity would benefit.
Possible APIs to consider:
onUnmounted(solved with onScopeDispose)Beta Was this translation helpful? Give feedback.
All reactions