meteor-vue / vue-meteor

🌠 Vue first-class integration in Meteor
896 stars 111 forks source link

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

Open trusktr opened 6 years ago

trusktr commented 6 years ago

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 commented 6 years ago

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?

eybarta commented 5 years ago

@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