Skip to content

Introduce <ChannelProvider /> to hoist channel connection #43

Open
@jfulse

Description

@jfulse

Describe the bug
Thanks for a great library! If the following issue is as intended please disregard.

When a component with useChannel and useEvent is unmounted, the channel is unsubscribed from although other components are still subscribed. Thus subsequent events are not caught in the still mounted components.

This can be avoided by reorganising the component tree but seems hard to future proof.

To Reproduce
I will be happy to make a code sandbox but I'm not sure which Pusher app to connect to etc? Is the idea that I make the sandbox with placeholders and you enter your keys?

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