-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pusher.bind() not defined/supported #23
Comments
Hey, @snaptopixel, thanks for opening this issue! Supporting Could you help us and explain how would you use such a feature? This will give an idea of how to create support for it, as well as prove some examples of how to use it. |
Sure, thanks @nikolalsvk, I think the example shown on the Pusher docs is a decent case, multiple channels with the same event-name can be bound once. In our frontend, we initialize pages as web-components. Rather than require Pusher to be configured in each component, we are passing a pre-configured Pusher instance to them. Ideally we could also pre-subscribe to channels so that our page component(s) only need to be aware of the event name. In that case you can have something like: componentDidLoad() {
this.pusher.bind('some-event-here')
} Rather than componentDidLoad() {
const ch = this.pusher.subscribe('some-channel')
ch.bind('some-event-here')
} |
Hey, @snaptopixel, I made some progress and added support for Also, if you have any more suggestions or input, I'd really appreciate it. |
LGTM thanks much @nikolalsvk |
Hey, @snaptopixel, I just released 0.3.2 so you can play with it if you want. Thanks for the idea :) |
Thank you for building this lib, I'm trying to use it but
pusher.bind
does not seem to be supported.https://pusher.com/docs/channels/using_channels/events#binding-on-the-client
The text was updated successfully, but these errors were encountered: