Inputs to the shouldReconnect decision.
Number of reconnection attempts already made.
The WebSocket close code from the close event.
close
Whether the disconnect was initiated locally (manual disconnect/unmount).
Maximum number of reconnection attempts permitted.
Inputs to the shouldReconnect decision.