MCPcopy Create free account
hub / github.com/react-component/select / getUUID

Function getUUID

src/hooks/useId.ts:10–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9/** Get unique id for accessibility usage */
10export function getUUID(): number | string {
11 let retId: string | number;
12
13 // Test never reach
14 /* istanbul ignore if */
15 if (isBrowserClient) {
16 retId = uuid;
17 uuid += 1;
18 } else {
19 retId = 'TEST_OR_SSR';
20 }
21
22 return retId;
23}
24
25export default function useId(id?: string) {
26 // Inner id for accessibility usage. Only work in client side

Callers 1

useIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…