Published
- 1 min read
javascript generate unique id
The solution for this is noted below
javascript generate unique id
Solution
function randomId(): string {
const uint32 = window.crypto.getRandomValues(new Uint32Array(1))[0];
return uint32.toString(16);
}
Try other methods by searching on the site. That is if this doesn’t work