title: Passing a function as a prop to a functional component
body: <p>I am trying to pass a function as a prop into a functional React component. I keep getting the error <code>logThis is not a function</code>.</p>
  <p>The parent component is a class component with a function <code>logToConsole</code>. I summarized the code below:</p>
  <pre><code>logToConsole = (value) =&gt; {
    console.log(value)
  }
  render(){
    return(
      &lt;ChildComp logThis={this.logToConsole} /&gt;
    )
  }
  
  </code></pre>
  <p>The ChildComp is:</p>
  <pre><code>const ChildComp = (logThis) =&gt; (
    &lt;button onClick={()=&gt;logThis('test string')}&gt;Click Here&lt;/button&gt;
  )
  
  export default ChildComp
  </code></pre>