Skip to content

Which version of UUID does useId use? (e.g. v1 or v4) #591

Answered by UltraInstinct05
geoyws asked this question in Q&A
Discussion options

You must be logged in to vote

I don't see anywhere in https://mantine.dev/hooks/use-id/ where it mentions that the uuid package is being used. Nor is it present in package.json.

This is the source for it https://github.com/mantinedev/mantine/blob/master/src/mantine-hooks/src/use-id/use-id.ts. So it either sets the id based on the string you pass or else generates a random mantine- prefixed string (which uses Math.random under the hood).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@geoyws
Comment options

Answer selected by geoyws
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants