-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[docs] Add hash to key
to remove noise from console
#44289
Conversation
Netlify deploy previewhttps://deploy-preview-44289--material-ui.netlify.app/ Bundle size report |
const { description, className, name, defaultValue, hash } = params; | ||
|
||
return ( | ||
<tr key={className} id={hash}> | ||
<tr key={`${className}-${index}`} id={hash}> |
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.
Some components don't have specific className for each slot (like textfield), so just using className
as key
is creating noise in docs if multiple slots doesn't have className
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.
Maybe the hash
would be a better option since having two components with the same id would also be an issue
const { description, className, name, defaultValue, hash } = params; | ||
|
||
return ( | ||
<tr key={className} id={hash}> | ||
<tr key={`${className}-${index}`} id={hash}> |
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.
Maybe the hash
would be a better option since having two components with the same id would also be an issue
key
to remove noise from consolekey
to remove noise from console
Before:
After: