Skip to content

Commit 82ca91f

Browse files
update @livekit/components-react
1 parent 6946719 commit 82ca91f

File tree

3 files changed

+31
-36
lines changed

3 files changed

+31
-36
lines changed

hooks/useConnection.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,11 @@ export function ConnectionProvider({ appConfig, children }: ConnectionProviderPr
6666
return TokenSource.endpoint('/api/connection-details');
6767
}, [appConfig]);
6868

69-
const sessionOptions = useMemo(
70-
() => (appConfig.agentName ? { agentName: appConfig.agentName } : undefined),
71-
[appConfig]
69+
const session = useSession(
70+
tokenSource,
71+
appConfig.agentName ? { agentName: appConfig.agentName } : undefined
7272
);
7373

74-
const session = useSession(tokenSource, sessionOptions);
75-
7674
const value = useMemo(
7775
() => ({
7876
isConnectionActive,
@@ -87,10 +85,7 @@ export function ConnectionProvider({ appConfig, children }: ConnectionProviderPr
8785
session.end();
8886
},
8987
}),
90-
// session object is not a stable reference
91-
// TODO: add session object to dependencies
92-
/* eslint-disable-next-line react-hooks/exhaustive-deps */
93-
[isConnectionActive]
88+
[session, isConnectionActive]
9489
);
9590

9691
return (

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"format:check": "prettier --check ."
1212
},
1313
"dependencies": {
14-
"@livekit/components-react": "0.0.0-20251021151641",
14+
"@livekit/components-react": "0.0.0-agents-sdk-20251113071112",
1515
"@livekit/protocol": "^1.40.0",
1616
"@phosphor-icons/react": "^2.1.8",
1717
"@radix-ui/react-select": "^2.2.5",
@@ -21,7 +21,7 @@
2121
"class-variance-authority": "^0.7.1",
2222
"clsx": "^2.1.1",
2323
"jose": "^6.0.12",
24-
"livekit-client": "^2.15.8",
24+
"livekit-client": "^2.15.15",
2525
"livekit-server-sdk": "^2.13.2",
2626
"mime": "^4.0.7",
2727
"motion": "^12.16.0",

pnpm-lock.yaml

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)