Hey what is the best way to handle events dynamically. for example on chat list I want to have some logic handling events caught on onEvent, and on single chat page I want to have some other logic.
Right now I have created a provider in which I handle pusher connections, and the subscriptions are then handled dynamically on each screen. but the onEvent callback is passed only once on pusher init.
Right now I am emmiting custom events from inside the onEvent and subscribing to those then pass a specific callback to handle screen logic. was just wondering if there is any better approach provided by library
Hey what is the best way to handle events dynamically. for example on chat list I want to have some logic handling events caught on onEvent, and on single chat page I want to have some other logic. Right now I have created a provider in which I handle pusher connections, and the subscriptions are then handled dynamically on each screen. but the onEvent callback is passed only once on pusher init.
Right now I am emmiting custom events from inside the onEvent and subscribing to those then pass a specific callback to handle screen logic. was just wondering if there is any better approach provided by library