When using material-ui(^1.0.0-beta.24) and adding JSS Styles to my component as such:
class Counter extends Component{
getCount= () => {
return this.state.count;
}
}
export default withStyles(stylesJss)(Counter);
Accessing the counter component via the "ref" prop in the parent component like:
<Counter ref={(ref) => this.counter = ref} />
this.counter
results in a ProxyComponent
object instead of the underlying Counter class due to the withStyles
wrapper. I would like to access the Counter class and it's method(s) like such: this.counter.getCount()
from the parent and use it as a standard React uncontrolled component. How can this be obtained?