useToken
The useToken
hook fetches a token from the given token endpoint with the given user info.
Import
import { useToken } from "@livekit/components-react";
Usage
const token = useToken(<token-endpoint>, roomName, { userInfo: { identity, name }});
Properties
Returns
string | undefined;