title: Call child component function from parent
body: <p>How do I call a child component function from the parent component? I've tried using refs but I can't get it to work. I get errors like, Cannot read property 'handleFilterByClass' of undefined.</p>
  
  <p>Path: <code>Parent Component</code></p>
  
  <pre><code> export default class StudentPage extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
      };
    }
    newStudentUserCreated() {
      console.log('newStudentUserCreated1');
      this.refs.studentTable.handleTableUpdate();
    }
  
    render() {
      return (
        &lt;div&gt;
          &lt;StudentTable
            studentUserProfiles={this.props.studentUserProfiles}
            ref={this.studentTable}
          /&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>Path: <code>StudentTable</code></p>
  
  <pre><code>export default class StudentTable extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
       studentUserProfiles: props.studentUserProfiles,
      };
  
      this.handleTableUpdate = this.handleTableUpdate.bind(this);
    }
  
    handleTableUpdate = () =&gt; (event) =&gt; {
      // Do stuff
    }
  
    render() {
      return (
        &lt;div&gt;
         // stuff
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p><strong>UPDATE</strong>
  Path <code>StudentContainer</code></p>
  
  <pre><code>export default StudentContainer = withTracker(() =&gt; {
    const addStudentContainerHandle = Meteor.subscribe('companyAdmin.addStudentContainer.userProfiles');
    const loadingaddStudentContainerHandle = !addStudentContainerHandle.ready();
    const studentUserProfiles = UserProfiles.find({ student: { $exists: true } }, { sort: { lastName: 1, firstName: 1 } }).fetch();
    const studentUserProfilesExist = !loadingaddStudentContainerHandle &amp;&amp; !!studentUserProfiles;
  
    return {
      studentUserProfiles: studentUserProfilesExist ? studentUserProfiles : [],
    };
  })(StudentPage);
  </code></pre>