Returns the current user ID.
Optional
Created using the Web SDK's IAgoraRTC.createClient method.
IAgoraRTC.createClient
import { useCurrentUID } from "agora-rtc-react";function App() { const uid = useCurrentUID(); return <div>{uid}</div>;} Copy
import { useCurrentUID } from "agora-rtc-react";function App() { const uid = useCurrentUID(); return <div>{uid}</div>;}
Returns the current user ID.