Function: useId()
function useId(prefix: string): undefined | string
Creates a unique ID, with the given prefix. If UNDER_TEST is set to true, it will return the same ID every time, so snapshots do not get invalidated.
Parameters
Parameter | Type | Default value |
---|---|---|
prefix | string | '' |
Returns
undefined
| string