title: React: how to fire the parent component method?
body: <p>How do I get access from component to the methods of the owner of this component?</p>
  <p>I.e. (maybe) you need to get a pointer to the owner of the element and already call the method by the pointer.</p>
  <p>For example:</p>
  <p>component #1</p>
  <pre><code>class MyReport extends Component {
    my_method() {}
  
    render() {
      return (
        &lt;MyReport&gt;
          &lt;MyElement /&gt;
        &lt;/MyReport&gt;
      );
    }
  }
  </code></pre>
  <p>and component #2</p>
  <pre><code>class MyElement extends Component {
    constructor(props) {
      super(props);
  
      this.handleClick = this.handleClick.bind(this);
    }
  
    handleClick(event) {
      // GET METHOD my_method OF OWNER
      console.log(parent.my_method());
    }
  
    render() {
      return &lt;Button onClick={this.handleClick}&gt;Press&lt;/Button&gt;;
    }
  }
  </code></pre>