-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): replace uuid
dependency with crypto.randomUUID()
#976
Conversation
@@ -723,7 +723,7 @@ function Editor(props: RouteComponentProps) { | |||
} | |||
return ( | |||
<div | |||
key={v4()} | |||
key={uuid()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a side observation. I'm guessing the uuid is used here to please eslint-react, but I don't think key-ing with a UUID is desirable. Ideally it would be some piece of data from the array of objects that is deterministic between renders.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for finding this! This should have used the id of the view or track instead. I will update this after testing it.
uuid
dependency with crypto.randomUUID()
uuid
dependency with crypto.randomUUID()
Looks good! Wondering if in the future we should also replace instances of |
Fix #
Toward #
Change List
uuid
and@types/uuid
as direct dependenciessrc/core/utils/uuid.ts
, which exports auuid
functionChecklist