From 70af0d20a2a23a8a6f755ec50b46a1f4f227166f Mon Sep 17 00:00:00 2001 From: lukasIO Date: Thu, 21 Nov 2024 13:58:10 +0100 Subject: [PATCH] update effect dependencies --- packages/react/src/hooks/useLiveKitRoom.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/react/src/hooks/useLiveKitRoom.ts b/packages/react/src/hooks/useLiveKitRoom.ts index 752e0ccd0..680ea4f83 100644 --- a/packages/react/src/hooks/useLiveKitRoom.ts +++ b/packages/react/src/hooks/useLiveKitRoom.ts @@ -112,7 +112,17 @@ export function useLiveKitRoom( .off(RoomEvent.Disconnected, handleDisconnected) .off(RoomEvent.Connected, handleConnected); }; - }, [room, audio, video, screen, onError, onEncryptionError, onMediaDeviceFailure]); + }, [ + room, + audio, + video, + screen, + onError, + onEncryptionError, + onMediaDeviceFailure, + onConnected, + onDisconnected, + ]); React.useEffect(() => { if (!room) return;