Meteor/Svelte Reactive Subscriptions

Ah, I should probably be toning that message down now that it’s been used by a bunch of people for a couple of months and issues have been fixed, etc. The package started out as an experiment but it looks like it’s working well enough for me to use it in production myself. I’ll continue to update it as people find issues, of course.

4 Likes

I adapted this a little. Getting a search from an input and subscribing based off the query.

export let subscription;
$: {
    subscription?.stop();
    subscription = Meteor.subscribe("itemsSearch", query);
};

Had to use optional chaining on the .stop() as it was undefined.

1 Like