title: React TypeScript | Correct Type for Event Handler Prop
body: <p>My App component passes down an event handler as a prop to a <code>Button Component</code></p>
  
  <pre class="lang-js prettyprint-override"><code>// App.js
  
    public handlePlay = () =&gt; {
      this.setState({ ****** })
    }
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>// render
  
  &lt;Button play={this.handlePlay} /&gt;
  </code></pre>
  
  <p>What is the <strong>correct type</strong> for the event handler passed via prop i.e. <code>play</code>?</p>
  
  <pre class="lang-js prettyprint-override"><code>// Button.js
  interface ButtontProps {
    play: any //what is the correct type here?
  }
  
  export const Button: React.SFC&lt;ButtontProps&gt; = ({ play }) =&gt; (
    &lt;button onClick={play}&gt;Play&lt;/button&gt;
  )
  
  </code></pre>
  
  <p>I don't want to use <code>any</code> as that would divert me from applying the correct types for such an instance.</p>