title: React - Call props function inside of a components function
body: <p>Trying to do something like this:</p>
  
  <p>// Component one</p>
  
  <pre><code>toggleDropdown() {
    setState({open: !open}
  }
  
  render () {
    return (
     ChildComponent toggle={this.toggleDropdown} /&gt;
    )
  }
  </code></pre>
  
  <p>Then in my child component I'd like to call that toggleDropdown function in another function like this:</p>
  
  <pre><code>// This gets triggered on click.
  removeItem() {
    // remove scripts then:
    this.props.toggleDropdown()
  }
  </code></pre>
  
  <p>I thought you'd be able to do something like this but it appears that you can only call prop functions on the element?</p>