Function: idGenerator()
function idGenerator(): Generator<number, number, unknown>
Generator function that creates a unique ID sequence.
Returns
Generator
<number
, number
, unknown
>
Generator
Function
useId
Yields
The next unique ID in the sequence.
Example
const generateId = useId();
console.log(generateId.next().value); // 1
console.log(generateId.next().value); // 2
console.log(generateId.next().value); // 3