title: Add an event to a Stateless Component in ReactJS
body: <p>Is there any possible way to attach an <code>Event</code> to a stateless <code>Component</code>? Let me explain my question below:</p>
  
  <p>I have a stateless component for <code>bootstrap</code> button as:</p>
  
  <pre><code>export const Button = props =&gt; {
    return (
      &lt;button
        className={`btn btn-${props.type} ${props.class}`}
        type={props.buttonType}
      &gt;
        {props.children}
      &lt;/button&gt;
    );
  };
  </code></pre>
  
  <p>And I'm using the <code>&lt;Button/&gt;</code> component in <code>Parent</code> Component called <code>Container</code> as:</p>
  
  <pre><code>class Container extends Component {
    constructor(props) {
      super(props);
      this.state = {};
    }
  
    sendData() {
      // method logic
    }
  
    render() {
      return (
        &lt;Button type="primary" class=""&gt;
          Save Changes
        &lt;/Button&gt;
      );
    }
  }
  </code></pre>
  
  <p>To call <code>sendData()</code> method by clicking on <code>Button</code> component I have tried:</p>
  
  <pre><code>&lt;Button type="primary" onClick={() =&gt; this.sendDate()}&gt;
    Save Changes
  &lt;/Button&gt;
  </code></pre>
  
  <p>But this doesn't work.</p>
  
  <p>Is there any possible way to attach an event to a stateless <code>Component</code> to call a <code>Method</code> from <code>Parent</code> Component.</p>
  
  <p>I search over the Google but was unable to find the solution to this question, so please help me if you have any solution. Thanks much :)</p>