FunctionsidGeneratoridGenerator CallableidGenerator(): Generator<number, number, unknown>Generator function that creates a unique ID sequence.@generator@functionuseId@yieldsThe next unique ID in the sequence.@exampleconst generateId = useId();console.log(generateId.next().value); // 1console.log(generateId.next().value); // 2console.log(generateId.next().value); // 3Returns Generator<number, number, unknown>
Generator function that creates a unique ID sequence.
useId
The next unique ID in the sequence.