-
-
Notifications
You must be signed in to change notification settings - Fork 550
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
fix: add unique keys to iconNode and children to resolve React errors #2655
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Eric Fennis <[email protected]>
@ericfennis Good catch, I applied your suggested changes |
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.
I don't think that's a good idea, using indexes as keys is not something we should do.
@jguddas This is only when custom icons are added. The icon nodes we provide have random keys generated based on the content. |
My opinion stays the same, we should not do this. If you want to fix the error add keys to your custom icon data, https://lucide-studio.vercel.app does it automatically already. |
What is the purpose of this pull request?
Description
This PR resolves the missing
key
warnings in theIcon
component by adding uniquekey
props to the elements created fromiconNode
andchildren
.Closes #2654
Before Submitting