Closed Prinzhorn closed 3 years ago
Is rdb:svelte-meteor-data in .meteor/versions
? It modifies Meteor.subscribe
to automatically unsubscribe when the component is destroyed.
Thank you very much, it is indeed! I was using the official Svelte skeleton and it includes both packages (https://github.com/meteor/meteor/blob/de41620db3ebd68e223fb1ae0a0eba9fd91cc700/tools/static-assets/skel-svelte/.meteor/packages).
I see value in both packages, but I like how unobtrusive this package is. I'll stick with it, thanks for creating it.
I'm probably just very confused right now. To track down some subscription issue I've narrowed it down to this:
If I render this component conditionally (toggling a checkbox) it will subscribe / unsubscribe from
contacts
. How? There is no$m
orTracker
. I also can't see anonDestroy
being generated for this component. What is this magic and how do I disable it? Does melte somehow globally wrap every component in a Tracker?Edit: I need this because I want certain subscriptions to be subscribed to lazily (once needed) but then keep them open forever. I had this abstracted away and wondered why it was unsubscribing.