Reconnecting WebSocket

JSON →
library 1.0.0 ·javascript
verified Jun 7, 2026

A drop-in replacement for the WebSocket API that automatically reconnects when the connection is closed. Version 1.0.0 is the latest stable release, actively maintained on GitHub with full test coverage and TypeScript definitions. It is dependency-free, works in browsers, Node.js, ServiceWorkers, and React Native, and supports URL providers for dynamic server selection. Key differentiators: no external dependencies, fully configurable reconnection delays with exponential backoff, connection timeout handling, and debug mode. The package is a fork of reconnecting-websocket with a fix for close event handling.