MietzeKatzeM
Convex Community2mo ago
1 reply
MietzeKatze

How to handle Websocket Errors

hello, when I use :
import { useConvexConnectionState } from "convex/react";

const connectionState = useConvexConnectionState();

if (!connectionState.isWebSocketConnected) {
  // Handle offline state or WebSocket connection error here
}


the connection state takes about 20 seconds before its turning to disconnected.
In that time the user could have made many inputs that will be lost.
How can I make sure that I catch those inputs, that will not be sent to send them later?
Was this page helpful?