title: Call function from JTX.Element
body: <p>I have a component that maps a JTX.Element. In that element I need to call a function of the original component. However when I call it I get a <code>TypeError: Cannot read property 'handleClickOpen' of undefined</code> error. How can I get <code>RenderComments</code> to see <code>this</code>?</p>
  
  <pre><code>const RenderComments = (comment) =&gt; (
  &lt;div&gt;
      {comment.cur_user_id == comment.comment.user_id
      ? &lt;Button onClick={() =&gt; this.handleClickOpen(comment.comment.cid, comment.comment.comment)} &gt;
          Edit
        &lt;/Button&gt;
      : null
      }
  &lt;/div&gt;
  )
  
  class showpost extends Component {
      constructor(props) {
          super(props)
  
          this.state = {
              open: false,
              comment: '',
              cid: ''
          }
      }
  
      handleClickOpen = (cid, comment) =&gt; (
            this.setState({
            open: true,
            comment: comment,
            cid: cid
          })
      )
  
      render() {
          return (
              &lt;div&gt;
                  &lt;h2&gt;Comments:&lt;/h2&gt;
                  { this.props.comments 
                    ? this.props.comments.map(comment =&gt;
                            &lt;RenderComments comment={comment} 
                                  cur_user_id={this.props.db_profile[0].uid}
                                  key={comment.cid} /&gt;) 
                    : null
                  }
              &lt;/div&gt;
          )  
      }
  }
  </code></pre>