vue-meteor icon indicating copy to clipboard operation
vue-meteor copied to clipboard

Why do we need vue-supply if vue-meteor-tracker auto-cleans everything?

Open trusktr opened this issue 7 years ago • 2 comments

vue-meteor-tracker says:

Add an object for each subscription in a $subscribe object. The object key is the name of the publication and the value is either an array of parameters or a function returning an array of parameters. These subscription will be stopped when the component is destroyed.

Then, vue-supply says:

you can subscribe to a realtime publication in the activate method and destroy this subscription in the deactivate method. When you will use this Supply in your components (called 'consumers'), it will automatically activate itself when it is first used (with the grasp method) or deactivate itself when no component use it anymore (with the release method).

So, I'm confused. They both provide a way to create and clean up subscriptions. So which one do I want to use? Do I use both of them? Only one of them? It'd be nice if this was a little more clear from the outside. 😊

trusktr avatar Jan 15 '18 05:01 trusktr

Oh, I think I see. Vue-supply is generic, not necessarily for with Meteor, and can be any sort of resource (like a singleton)? While vue-meteor-tracker is specific for Meteor subscriptions?

trusktr avatar Jan 15 '18 05:01 trusktr

@trusktr hey, have you figured this out yet? I'm also trying to decide which to use, and it seems the main difference is that vue-supply can work inside vuex and vue-meteor-tracker is only for components.. but I haven't got a reply that confirms this... Have you been using either of them? thx

eybarta avatar Dec 22 '18 11:12 eybarta