-
-
Notifications
You must be signed in to change notification settings - Fork 39
feat: support vue 3.2 #66
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
Conversation
I don't think reactivue is relevant since the release of EffectScope API. The advantage of reactivue over EffectScope is the support of Vue plugins and lifecycle hooks. Vue plugin support is limited to very simple ones and will not work in complex ones like vue-i18n and vue-router. Even if we get them working it is still not worth the overhead. With the release of Composition API in Vue 3, most Vue plugins are now just simple utility hooks. VueUse is one of the best examples of this. Previously, I have used VueUse hooks with effectScope in React, Svelte, Qwik, Solid, and some other small frameworks with their own way of managing lifecycle. It was really easy and straightforward. If anyone is going to build something serious, I recommend them to explore first-party integrations instead. If you are a React user who wants to take advantage of Vue libs like VueUse, I would suggest you use EffectScope API. @antfu I don't expect any more progress on #46. I'm in favor of deprecating reactivue and referring to effectScope docs. |
If I need to use it in React, I might still wrap it in a
|
To me, @sibbng if you plan to discontinue #46, I am thinking of keeping the current approach but merging @CJY0208's work to make it up-to-date with minimal effort. Efficiency to me it not really relevant, as it's React after all :P |
Description
support vue 3.2 using
effectScope
This change has been verified to work in my scoped npm package @cjy0208/reactivue
online demo: https://codesandbox.io/s/agitated-satoshi-c34t7u
I really like this tool and hope that this PR can help the 0.x version continue to work.
Linked Issues
#65
#64
#52
#51
#48
#45
Additional context