title: Typescript + React call parent method from child component
body: <p>I am trying to call parent method from child component, but it doesn't work and method in parent element is not triggered. In this example I have only two components where <code>ChildHello</code> calls method in <code>Hello</code> component.</p>
  
  <p><a href="https://codesandbox.io/s/7wqx6q6w1j" rel="nofollow noreferrer">codesandbox</a></p>
  
  <p><strong>Hello.tsx</strong></p>
  
  <pre><code>import * as React from "react";
  
  interface Props {
    itemClicked: () =&gt; void;
  }
  
  export class Hello extends React.Component&lt;Props, {}&gt; {
    constructor(props: Props) {
      super(props);
    }
  
    itemClicked = val =&gt; {
      console.log(val);
    };
  
    render() {
      const { name } = this.props;
      return &lt;h1 itemClicked={this.itemClicked}&gt;{this.props.children}&lt;/h1&gt;;
    }
  }
  
  const styles = {
    height: "400px"
  };
  
  export class ChildHello extends React.Component&lt;Props, {}&gt; {
    constructor(props: Props) {
      super(props);
    }
  
    render() {
      return (
        &lt;div onClick={this.props.itemClicked} style={styles}&gt;
          &lt;Hello&gt;Hello Child&lt;/Hello&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>