title: React HOC - Access wrapped component function
body: <pre><code>PRESENTATIONAL COMPONENT
  class ClientsPage extends React.Component {
  
  _myFunction() {
  //do what needs to be done
  }
  
  render() {
  return &lt;div&gt;&lt;/div&gt;
  }
  }
  export default doMagic(ClientsPage)
  
  
  
  HOC COMPONENT
  export const doMagic= (WrappedComponent) =&gt; {
      return class MyMagic extends React.Component {
          render() {
              const props = Object.assign({}, this.props , {
                  xxx: ???,
              });
  
              return &lt;WrappedComponent { ...props } /&gt;
          }
      };
  }
  </code></pre>
  
  <p>Hi guys, i have react component and want to transform it in some way in my HOC component.
  But heres the problem. I want to create another prop lets call it xxx in HOC. This prop will be of type object and one of properties of this object should be function from wrapped component so womething like</p>
  
  <p>xxx : {callback : <strong>reference to function from wrapped component</strong>}</p>
  
  <p>Is this even possible ?</p>
  
  <p>thx in advance</p>