Now, a quick question. The docs have the following example:
{
shouldReconnect: (closeEvent) => {
/*
useWebSocket will handle unmounting for you, but this is an example of a
case in which you would not want it to automatically reconnect
*/
return didUnmount.current === false;
},
I'm having trouble understanding this, does this mean I should not need to implement this code in my actual application (e.g, it's just code for the sake of code in the demo), or should I implement this code in my actual application?
First, thanks for making this library!
Now, a quick question. The docs have the following example:
I'm having trouble understanding this, does this mean I should not need to implement this code in my actual application (e.g, it's just code for the sake of code in the demo), or should I implement this code in my actual application?