-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
MuiPickersFadeTransitionGroupRoot: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. #11531
Comments
Thank you for reporting this problem. 👍 P.S. The same error is also thrown if a I will create an issue in the |
This rule is disabled, so the deprecated |
@mtr1990 We've decided to not do anything in this regard. |
@LukasTy I got two warnings today although "react/require-default-props" is off. any suggestions to hide these warnings?
|
@hongz1 Would you be able to provide a minimal reproduction example so that we could test this behavior? 🤔 |
@LukasTy Here you go. I made new nextjs app with minimal dependencies. You will see those warning messages when you go to /test page. |
Hi Guys? |
This is also happening to me on my nextjs 14.1.4 application, is there a fix or not yet? |
As for why the error is reported on MuiPickersFadeTransitionGroupRoot, it's because of https://github.com/emotion-js/emotion/blob/73f688103c5307c90d7544508b6d935243e4299e/packages/styled/src/base.js#L183. We could yolo do: const PickersSlideTransitionRoot = styled(TransitionGroup, {
+delete PickersSlideTransitionRoot.defaultProps; to silence the error, but the one on TransitionGroup will stay 😄. So we truly want reactjs/react-transition-group#898. I'm recording this in: emotion-js/emotion#3184. It will make sense to kill this line at one point. |
You are probably referring to an ESLint rule? I'm sorry, but there does not seem to be any quick way to fix the issue. As for the time being—feel free to experiment with this suggestion: recharts/recharts#3615 (comment) 😉 |
@LukasTy It feels like:
|
Steps to reproduce
https://codesandbox.io/p/devbox/zealous-hawking-rrzwvv
Current behavior
No response
Expected behavior
No response
Context
No response
Your environment
No response
Search keywords: [next.js][ssr][StaticDatePicker]
The text was updated successfully, but these errors were encountered: