pusher / pusher-websocket-react-native

React Native official Pusher SDK
MIT License
61 stars 52 forks source link

Allow subscribing to specific channel event #155

Closed amitava82 closed 4 months ago

amitava82 commented 4 months ago

In web client bind method allows subscribing to specific event which isn't possible here. Also there is no way to add event listeners after channel has been subscribed. This makes impossible to subscribe to a channel events later point of time.

I'm proposing 2 changes:

  1. Add bind like functionality so that my component can listen to events it is interested in.
  2. Allow adding event listeners after channel has been subscribed so that components can subscribe to events when it is mounted.
benw-pusher commented 4 months ago

Thanks for the feedback - we aren't able to commit to a release for this at this time