class MyWrapper {
return React.Children.only(this.props.children);
}
class MyLibraryComponent {
render() {
return
{this.props.statelessComponentThatIWantToReference}
;
}
}
// ReactDOM.findDOMNode(mywrapperref) effectively returns a reference to the stateless component.
// You can find the DOM node of the stateless component, etc.
// It no longer matters if your users are using stateless components or real components.