react-use-websocket icon indicating copy to clipboard operation
react-use-websocket copied to clipboard

Add sendMessage as a parameter of the onOpen handler

Open bchilcott opened this issue 5 months ago • 1 comments

It looks like the sendMessage paramter was added to onOpen as part of #32 but has since been removed. Could we put this back, or is there a better way to send a message in the onOpen handler?

bchilcott avatar Sep 26 '25 02:09 bchilcott

Is your use-case there same the one in that issue? You are memoizing the options? It's not necessary. I posted a comment over there.

michaelboyles avatar Dec 02 '25 17:12 michaelboyles