title: Unable to access child function via ref?
body: <p>Initially everything was working fine,I have a component something like.
  this</p>
  
  <pre><code>  class A extends React.Component {
       constructor(props) {
         super(props);
         this.childRef = null
       }
  
      componentDidMount() {
       this.childRef = this.refs.b
       // now I can call child function like this
        this.childRef.calledByParent()
      }
  
      render(){
        &lt;B ref = "b"/&gt;
      }
    }
  </code></pre>
  
  <p>In other file</p>
  
  <pre><code>     class B extends React.Component {
  
         calledByParent(){
           console.log("i'm called")
          }
  
         render(){
          &lt;div&gt; hello &lt;/div&gt;
         }
    }
   export default B
  </code></pre>
  
  <p>till here it was working fine but when I do something like this in <code>class B</code> <code>export default  connect(mapStateToProps, mapDispatchToProps)(B)</code></p>
  
  <p>It is not working. I have imported connect from react-redux</p>