-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
"Each child in a list should have a unique "key" prop..." warning when importing library on other project. #4
Comments
Have the same issue. Only happens in library mode and production build, both when importing into another project or using UMD bundle on its own. Not using MUI. This is the code that seems to be causing the issue, if I remove
|
Facing same issue. Was anyone able to fix the error? |
Any updates on this? I'm facing the same issue using MUI DatePicker with LocalizationProvider. |
We're also facing this issue. I see that this ticket has been around since almost a year now. Will it be looked into by someone? |
Same. Hope this issue can be solved earlier. |
I wasn't able to reproduce it. I guess it's fixed now. |
Describe the bug
I have a project in library mode that exports a component. Said component uses
@mui/material
package and consists of the following:If I run the library as standalone project, I get no errors. If I build in development mode
vite build --mode development
and install the package on another project, I get no errors. But if I build in production modevite build
then when I import it on the other project I get the following warning on console:Each child in a list should have a unique "key" prop...
Adding a random key to
<Grid>
component and building for production also removes the warning.This is not the only situation where this warning pops up, I have at least 3 and they are hard to track. This is just an example I could isolate.
I am also not sure if the error is related to Vite or to Mui.
Reproduction
I created a minimal reproducible example, with instructions:
https://github.com/Vallo/vite-library-mode-unique-key-bug
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: