title: Is it possible to get ref of props.children?
body: <p>I want to get ref of Child component. What is the best way to do this?</p>
  
  <pre><code>class Child extends React.Component {
    render() {
      return &lt;div&gt;Child&lt;/div&gt;;
    }
  }   
  
  class GetRef extends React.Component {
  
    componentDidMount() {
       console.log(this.props.children.ref)
    }
  
  
    render() {
      return this.props.children
    }
  }
  </code></pre>
  
  <p>Edit:
  So I can use it like this</p>
  
  <pre><code>&lt;GetRef&gt;&lt;Child/&gt;&lt;/GetRef&gt;
  </code></pre>