robtaussig / react-use-websocket

React Hook for WebSocket communication
MIT License
1.63k stars 135 forks source link

Allow for an infinite number of reconnect attempts #181

Closed brtdv closed 9 months ago

brtdv commented 1 year ago

To use an infinite amount of reconnect attempts, "reconnectAttempts" in the Options object, should be provided with value -1.

JoeFurfaro commented 1 year ago

Just saw this now, closes #202!

shahyar commented 1 year ago

Why not just use reconnectAttempts: Infinity?