react-transition-group
react-transition-group copied to clipboard
Avoid the deprecated usage of `defaultProps`
What would you like improved?
The defaultProps
is deprecated and its usage should be replaced with default parameters.
Resources:
- https://twitter.com/dan_abramov/status/1133878326358171650
- https://github.com/jsx-eslint/eslint-plugin-react/issues/2396
- https://github.com/mui/mui-x/issues/11531
React 19 is removing support for .defaultProps
: https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-proptypes-and-defaultprops.
Clarification: the support is being removed for function components—the case of @emotion
.
As for this library, it's still using classes and the approach here seems valid. 🤷