title: React: pass ref through?
body: <p>I'm trying to figure out how to get access to a "public" method on a React Component, that's been decorated with any number of higher-order components. Something like this:</p>
  
  <pre><code>class Toolbar extends React.Component {
    openSubMenu(menuName) {
      // whatever
    }
  
    render() {
      // whatever
    }
  }
  
  export default compose(
    connect(mapStateToProps, mapDispatchToProps),
    preload(), // custom higher order component which displays loading state
  )(Toolbar);
  </code></pre>
  
  <p>If I now get a <code>ref</code> on the toolbar, the openSubmenu method isn't available, because it's hidden under (in this case 2) higher order components. Is there anyway to get to an arbitrary method on the underlying component?</p>