title: Pass down function with multiple parameters to child component w/ TypeScript
body: <p>I'm trying to pass a function as a prop to a child component in React but TypeScript is giving me errors. I have a function as such:</p>
  <pre><code>const submitData = (title: string, year: string): void =&gt; {
    // DO STUFF
  };
  
  // PASS IT TO CHILD
  &lt;ChildComponent
    submitData={submitData(&quot;do&quot;, &quot;stuff&quot;)}
  /&gt;
  </code></pre>
  <p>And in my Child component I pass the type and add it like such:</p>
  <pre><code>interface ChildComponentProps {
    submitData: (a: string, b: string) =&gt; void,
  };
  
  const ChildComponent: React.FC&lt;ChildComponentProps&gt; = ({submitData}) =&gt; {
    return (
      &lt;div&gt;
        &lt;form onSubmit={() =&gt; submitData(&quot;stuff&quot;, &quot;do&quot;)}&gt;
        //// etc. etc. etc.
      &lt;/div&gt;
    )
  };
  </code></pre>
  <p>I keep getting an error at the line where I pass it to the child component. It says:</p>
  <p><code>Type 'void' is not assignable to type '(a: string, b: string) =&gt; void'.</code></p>
  <p>Clearly the original submitData-function is not of <code>type &quot;void&quot;</code> but a function with two parameters. What am I doing wrong?</p>