title: React Js get the element which was clicked
body: <p><a href="https://jsbin.com/diyenakife/edit?html,js,output" rel="nofollow noreferrer">https://jsbin.com/diyenakife/edit?html,js,output</a></p>
  
  <p><strong>JSX</strong></p>
  
  <pre><code>let MY = React.createClass({
  
   sendMsg : function(e){
       alert($(e.target).attr('data-id'));
       //sendMsgButton = ??
  
   },
    render: function() {
      return (
  
  
        &lt;button is class = "send_msg"
        data-id = "10"
        onClick = {
          this.sendMsg
        } &gt;
        Send Message
        &lt;span&gt; INSIDE SPAN &lt;/span&gt; &lt;span className = "sendMsgIcon" &gt; ICON &lt;/span&gt; &lt;/button&gt;
      );
  
    }
  });
  
  
          ReactDOM.render(
            &lt;MY /&gt;,
            document.getElementById("container")
          );    
  </code></pre>
  
  <p>Whenever im clicking the button <code>sendMsg</code> i want the button element inside <code>sendMsg</code> function.</p>
  
  <p>But whenever im clicking a span or child element of the button <code>e.target</code>   returns the span/child element instead of button itself ( i know that's what e.target does) </p>
  
  <p>But how do i get the element which was clicked ?</p>
  
  <p>In Jquery its possible using </p>
  
  <pre><code>$('.sendMsg').click(function(){
    let sendMsgButton = $(this);
  });
  </code></pre>
  
  <p>How do i get the exact element ? </p>