Hello, is there a reason why the React component <...
# ask-ai
h
Hello, is there a reason why the React component LiveKitRoom, the onConnected prop doesn't return any data? I would have found it useful to have returned information about the
Room
. I realise I can utilise useLiveKitRoom to get information but it just results in more code / feels less efficient.
t
Thanks for reaching out, Sean. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Just a quick heads-up: the
onConnected
prop in the
LiveKitRoom
React component doesn’t actually return any data, like
Room
info. It’s simply a callback that runs when the room connection is up and running, but it doesn’t pass along any parameters or return values. If you’re looking to grab
Room
details as soon as the connection happens, a great way is to use the
useLiveKitRoom
hook or directly tap into the
Room
instance. Just give me a shout if you want some tips on how to do this smoothly—I’m here to help! Sources: docs/functions/LiveKitRoom.html | examples/nextjs/pages/customize.tsx
h
You've literally just repeated what I said back to me 👍
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!