-
Notifications
You must be signed in to change notification settings - Fork 459
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
Allow subscribing to multiple topics at once with same callback #188
Comments
I don't know if this addresses your issue, but you don't have to use anonymous functions as the receiver of notifications. function callback(msg, data) {
// ...
}
PubSub.subscribe(EVENT_1, callback);
PubSub.subscribe(EVENT_2, callback);
PubSub.subscribe(EVENT_3, callback); Additionally, you can use hierarchical adressing to solve the problem of subscribing to multiple events. If you really need to have |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would be nice to be able to set the same callback for multiple topics at once, for cases where you want the same thing to happen for any of a set of events.
Something like
The text was updated successfully, but these errors were encountered: