How can I add multiple listener functions for one event? (FIXED) #3746
-
Is it possible? I am using socket.io on a react project and I'm trying to listen to one event in 2 different components. The problem is only one of them is working, I think the other one is being replaced. Thanks! Edit: I found out somewhere in my component tree, all listeners on that event gets turned off. (FIXED) |
Beta Was this translation helpful? Give feedback.
Answered by
darrachequesne
Jan 8, 2021
Replies: 1 comment
-
Thanks for the update! For future readers, you can register any number of listeners for a given event, they will all be called. See also:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
darrachequesne
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the update!
For future readers, you can register any number of listeners for a given event, they will all be called.
See also: