Warning: Styled(button): Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. #201
Warning: Styled(button): Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
I believe the recommended way to set default props now is to use JS destructuring and default values, something like this may work for the Button component:
This error is printing in the logs:
defaultProps
is being deprecated by React: https://github.com/facebook/react/pull/25699I believe this is the culprit, https://github.com/react-hook-form/devtools/blob/34e2e2e1deb3aa92fc8b9e03e99d6c911809d629/src/styled.tsx#L26
I believe the recommended way to set default props now is to use JS destructuring and default values, something like this may work for the
Button
component: