Original question: https://github.com/acdlite/recompose/issues/232
How can I access the ref of the BaseComponent or any level of the components?
Code:
class BaseComponent {
doSth(){...}
}
const Component compose(...some)(BaseComponent);
class App {
componentDidMount() {
// undefined(doSth) is not a function
this.refs.component.doSth();
}
render() {
<Component ref="component" />
}
}