Function: useId()
function useId(prefix?: string): string | undefined;
Defined in: lib/util.ts:452
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
string | undefined