mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-05 13:29:44 +02:00
subscribe/onReconnect used wsRef (a ref) with empty useCallback deps, so the function identity never changed when the WSClient was recreated. Consumers' effects never re-ran, leaving handlers registered on the old (disconnected) client. Switch to wsClient state so the callback identity updates on reconnect, causing all useEffect consumers to re-subscribe on the new client. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>