Closed tristola closed 1 year ago
This is a question, If i have an event listener and would like to change it.
client.on('data', function(data) { console.log('message was received', data); });
How can i remove or replace it ? if i add a new one it will call all the old ones too.
Have you tried saving the function in a useRef?
@tristola, for this kind of questions. I would kindly ask you to submit them to forums such as Stack Overflow.
This is a question, If i have an event listener and would like to change it.
How can i remove or replace it ? if i add a new one it will call all the old ones too.