function useOnReconnect
useOnReconnect(callback: () => void): void

Calls callback after each reconnection of the socket, never on the first connection, for the component to fetch again what it may have missed while the socket was down. The live lists and pages use it.

Parameters

callback: () => void

Return Type

void

Usage

import { useOnReconnect } from "src/hooks/ws/useWS.ts";