-
Notifications
You must be signed in to change notification settings - Fork 722
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
Using Box from MUI cause error #823
Comments
Same thing here. This is not great for MUI users. |
Do you have an idea of what's causing this problem? From the stack overflow it looks like removing some random d files "solves it", but it's not clear to me why those specific files would be a problem. I don't get why ts would fail to correctly guess the type of Box since both would be imported and not parts of global namespace overrides 🤔 @joshuaellis @CodyJasonBennett ideas? |
This pretty clearly sounds like a larger issue with TypeScript although I'd be interested in potential workarounds regarding the Box component. |
Some insight into why TS produces this error can be found here: microsoft/TypeScript#33130 |
I've seen this issue in projects that don't use drei. I was able to solve it by specifying the
|
Just for cross-referencing, I filed mui/material-ui#34068 in the MUI repo with more of an explanation of what's going on. |
I am using References: |
This was fixed in R3F v8.17.8. |
I could be wrong, but I think this issue was slightly different, and was fixed on the MUI side by mui/material-ui#43384 |
After adding the component "drei" to my existing project, every occurrence of Box from Material UI (mui.com) produce this error:
Expression produces a union type that is too complex to represent. TS2590
Adding this completely redundant property to every single Box in the whole project solve it somehow:
component='div'
https://stackoverflow.com/questions/68692230
But this workaround is very ugly.
Similar issue reported here:
#704 (comment)_
The text was updated successfully, but these errors were encountered: