-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
withStyles causes Typescript error on Fab - component prop is missing #15938
Comments
I'm also getting this odd error using withStyles in various places:
I can file a separate issue if appropriate. |
Potentially the same as #15827 |
|
I am trying to do something as simple as this, and I'm getting an error which breaking everything. Any ideas? seems related
|
I am seeing same issue with Popper, Fade, Grow as well. Anywhere I use these components started throwing invalid hooks error. I think I will go back to previous version. it looks like 4.0.1 is not stable atm. |
Closing this in favor of #15695. The underlying issue is the same: Passing the |
The Fab component loses the component prop in Typescript after being used with withStyles
Expected Behavior 🤔
The higher order component created with withStyles should behave the same way as the original component
Current Behavior 😯
I get a typescript error when using the custom Fab created with withStyles
Steps to Reproduce 🕹
Link: https://codesandbox.io/s/createreactappwithtypescript-7vxvf
See the error on the CustomFab example with the component prop, and no error on the other two examples.
Context 🔦
I can't upgrade to material-ui v4 because of the typescript errors
Your Environment 🌎
The text was updated successfully, but these errors were encountered: