Closed
Description
When I do
class MyC extends React.Component {
this.someRef = React.createRef<HTMLButtonElement>();
render() {
return (
<IconButton buttonRef={this.someRef} />
);
}
}
it works but the following warning is issued
Warning: Failed prop type: Invalid prop `buttonRef` of type `object` supplied to `ButtonBase`, expected `function`.
in ButtonBase (created by WithStyles(ButtonBase))
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
No warning should be issued
Current Behavior
A warning is issued
Steps to Reproduce (for bugs)
See above
Context
Your Environment
Tech | Version |
---|---|
Material-UI | latest |
React | 16.3 |
browser | Chrome 66 |
etc | TS 2.8.3 |