-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Please expose Dep in Vue.util #5258
Comments
For reference, Meteor has a dependency tracking system very similar to the one used in VueJS, and they expose their
I hope the same can be done on VueJS. |
Just wondering, would this pull request #4652 fully satisfy the need of this particular issue? |
You are totally right. I missed this PR when I did my search earlier. Thanks a lot! |
Can this be reopened since mentioned pull request was abandoned? |
I made this package which exposes |
What problem does this feature solve?
This is for users who are implementing bridges between the reactivity of VueJS and external systems which manage their own data internally and which have their own reactivity system.
Giving a way to users to access
Dep
will allow them to define a dependency in a simple way. The use case is for defining changing values from other systems (mini-mongo's reactive queries, for instance) as dependencies in watched functions.Currently, the users can only use
defineReactive()
, which means that there should be an object and a field for the dependency to exist. It is quite painful since the only thing needed is aconst dep = new Dep()
on which we would calldepend()
each time the external resource (function, db cursor, etc ...) changed.What does the proposed API look like?
I propose to expose
Dep
in the objectVue.util
.The text was updated successfully, but these errors were encountered: