Skip to content

A reactive subscription creates infinite amount of subscriptions when props change #5

@arggh

Description

@arggh

When I create a subscription that reacts to changing props like so:

<script>
export let page;
$: Meteor.subscribe('stuff', { page });
</script>

...the old subscriptions will not be stopped until the component is destroyed. That means, if page changes a lot, a lot of "stale" subscriptions will be persisted until the component is destroyed.

Screenshot 2020-07-24 at 15 28 24

Wouldn't it make sense to close the old subscription when the props change?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions