title: How to call parent class function in child class in React JS
body: <p>Following is my code snippet </p>
  
  <p><strong>Child Class function (handleClick)</strong></p>
  
  <pre><code>import React, { Component } from 'react';
  import {render} from 'react-dom';
  
  export class Badge extends Component {
    handleClick() {
      alert("this and that")
    }
    render() {
      return (
        &lt;button whenClicked={this.handleClick} className={"btn " + this.props.className} type="button"&gt;
          {this.props.title} &lt;span className={this.props.subTitleClassName}&gt;{this.props.subTitle}&lt;/span&gt;
        &lt;/button&gt;
      );
    }
  }
  </code></pre>
  
  <p><strong>Parent Class</strong></p>
  
  <pre><code>export class Dropdown extends Component {
    render() {
      return (
        &lt;div className="dropdown"&gt;
          &lt;Badge onClicked={this.props.whenClicked} className="btn btn-default" title={this.props.title} subTitleClassName="caret" /&gt;
        &lt;/div&gt;    
      );
    }
  }
  </code></pre>
  
  <p>In above code whenever I try to call handleClick function in child class it is not working.</p>