I have a chat app which is written in React. I've defined multiple hooks which handle different protocols like useMultiUserChat or even specific stanza type like useIqStanzaRequest.
In useMultiUserChat hook, I have another useXmppEvent('stanza', onStanzaHandler), so I have multiple listeners attached to a stanza event. It seems this is either problematic for this library, or I'm not seeing something. The useXmppEvent hook looks like this:
Hi everyone,
I have a chat app which is written in React. I've defined multiple hooks which handle different protocols like
useMultiUserChat
or even specific stanza type likeuseIqStanzaRequest
.I have the following code:
In
useMultiUserChat
hook, I have anotheruseXmppEvent('stanza', onStanzaHandler)
, so I have multiple listeners attached to a stanza event. It seems this is either problematic for this library, or I'm not seeing something. TheuseXmppEvent
hook looks like this:I would really appreciate some help as I'm already stuck on this for quite some time.