useId
Datalayer Core / useId
Function: useId()
Call Signature
useId(
idFromProps):string
Defined in: src/hooks/useId.ts:90
useId
Autogenerate IDs to facilitate WAI-ARIA and server rendering.
Note: The returned ID will initially be null and will update after a
component mounts. Users may need to supply their own ID if they need
consistent values for SSR.
Parameters
idFromProps
string
Returns
string
See
Docs https://reach.tech/auto-id
Call Signature
useId(
idFromProps):number
Defined in: src/hooks/useId.ts:91
useId
Autogenerate IDs to facilitate WAI-ARIA and server rendering.
Note: The returned ID will initially be null and will update after a
component mounts. Users may need to supply their own ID if they need
consistent values for SSR.
Parameters
idFromProps
number
Returns
number
See
Docs https://reach.tech/auto-id
Call Signature
useId(
idFromProps):string|number
Defined in: src/hooks/useId.ts:92
useId
Autogenerate IDs to facilitate WAI-ARIA and server rendering.
Note: The returned ID will initially be null and will update after a
component mounts. Users may need to supply their own ID if they need
consistent values for SSR.
Parameters
idFromProps
string | number
Returns
string | number
See
Docs https://reach.tech/auto-id
Call Signature
useId(
idFromProps):undefined|string
Defined in: src/hooks/useId.ts:93
useId
Autogenerate IDs to facilitate WAI-ARIA and server rendering.
Note: The returned ID will initially be null and will update after a
component mounts. Users may need to supply their own ID if they need
consistent values for SSR.
Parameters
idFromProps
undefined | null | string
Returns
undefined | string
See
Docs https://reach.tech/auto-id
Call Signature
useId(
idFromProps):undefined|number
Defined in: src/hooks/useId.ts:94
useId
Autogenerate IDs to facilitate WAI-ARIA and server rendering.
Note: The returned ID will initially be null and will update after a
component mounts. Users may need to supply their own ID if they need
consistent values for SSR.
Parameters
idFromProps
undefined | null | number
Returns
undefined | number
See
Docs https://reach.tech/auto-id
Call Signature
useId(
idFromProps):undefined|string|number
Defined in: src/hooks/useId.ts:95
useId
Autogenerate IDs to facilitate WAI-ARIA and server rendering.
Note: The returned ID will initially be null and will update after a
component mounts. Users may need to supply their own ID if they need
consistent values for SSR.
Parameters
idFromProps
undefined | null | string | number
Returns
undefined | string | number
See
Docs https://reach.tech/auto-id
Call Signature
useId():
undefined|string
Defined in: src/hooks/useId.ts:98
useId
Autogenerate IDs to facilitate WAI-ARIA and server rendering.
Note: The returned ID will initially be null and will update after a
component mounts. Users may need to supply their own ID if they need
consistent values for SSR.
Returns
undefined | string