title: How to access child component functions via refs
body: <p>The docs for React state that component functions can be accessed by a parent component via refs. See: <a href="https://facebook.github.io/react/tips/expose-component-functions.html">https://facebook.github.io/react/tips/expose-component-functions.html</a></p>
  
  <p>I am attempting to use this in my application but run into an "undefined is not a function" error when the child function is called. I'm wondering if this has anything to do with using the ES6 format for React classes because I don't see any other differences between my code and the docs.</p>
  
  <p>I have a Dialog component that looks like the following pseudocode. The Dialog has a "Save" button that calls save(), which needs to call the save() function in the child Content component. The Content component collects information from child form fields and performs the save.</p>
  
  <pre><code>class MyDialog extends React.Component {
    save() {
      this.refs.content.save();                    &lt;-- save() is undefined
    }
  
    render() {
      return (
        &lt;Dialog action={this.save.bind(this)}&gt;
          &lt;Content ref="content"/&gt;
        &lt;/Dialog&gt;);
     }
  }
  
  class Content extends React.Component {
    save() {
      // Get values from child fields
      // and save the content
    }
  }
  </code></pre>
  
  <p>I could instead pass a prop (saveOnNextUpdate) down to Content and then execute save whenever it is true, but I would rather figure out how to get the method detailed in the React doc above to work.</p>
  
  <p>Any ideas on how to get the doc approach to work or access the child component function in a different way?</p>