title: React onClick event on link
body: <p>I have this weird thing i have this simple component</p>
  
  <pre><code>import React, {Component} from 'react';
  const Logo = ({onClick}) =&gt; {
  return (
  
      &lt;a name="home" onClick={onClick} className="logo"&gt;
  
          &lt;span className="logo-mini"&gt;&lt;/span&gt;
  
  
  
      &lt;/a&gt;
  
  );
  };
  
  
  export default Logo;
  </code></pre>
  
  <p>the onClick event suppose to to get the click event on the link to get attribute name but what i got is undefined when i console.log the <code>event.target</code> the out put is <code>&lt;span class="logo-lg"&gt;&lt;/span&gt;</code> </p>
  
  <p>in the root compenent my render methode call <code>&lt;Logo onClick={this.handleClick}/&gt;</code>
  handleClick method </p>
  
  <pre><code>    handleClick(){
      let to = event.target.name;
      console.log(event.target);
      }
  </code></pre>