Closed jsheffers closed 4 years ago
Component: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
]),
This is current validation. Maybe something is missing but I don't have time to support this at the moment, so I will gladly review and merge PR.
Given that it is a warning, I would just ignore it for now. I don't plan do any significant changes here, so you should be good
I guess PropTypes.elementType might solve it (added in prop-types@15.7.0
).
I'm trying to implement this with the TextareaAutosize component from Material UI. I'm creating a functional component and including it. It works, however, it throws a warning in the console:
Warning: Failed prop type: Invalid prop `Component` supplied to `t`.
It seems to function properly. Should I be doing this a different way? Codesandbox with this replicated:
Full example: https://codesandbox.io/s/fervent-hamilton-8pt2z