Which version of UUID does useId use? (e.g. v1 or v4) #591
-
I couldn't find anything in the documentation 😅 |
Beta Was this translation helpful? Give feedback.
Answered by
UltraInstinct05
Dec 29, 2021
Replies: 1 comment 1 reply
-
I don't see anywhere in https://mantine.dev/hooks/use-id/ where it mentions that the 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 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
geoyws
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 inpackage.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 randommantine-
prefixed string (which usesMath.random
under the hood).