title: How to access custom attributes from event object in React?
body: <p>React is able to render custom attributes as described at 
  <a href="http://facebook.github.io/react/docs/jsx-gotchas.html" rel="noreferrer">http://facebook.github.io/react/docs/jsx-gotchas.html</a>:</p>
  
  <blockquote>
    <p>If you want to use a custom attribute, you should prefix it with
    data-.</p>
    
    <p><code>&lt;div data-custom-attribute="foo" /&gt;</code></p>
  </blockquote>
  
  <p>And that's great news except I can't find a way to access it from the event object e.g.:</p>
  
  <pre><code>render: function() {
  ...
  &lt;a data-tag={i} style={showStyle} onClick={this.removeTag}&gt;&lt;/a&gt;
  ...
  removeTag: function(event) {
      this.setState({inputVal: event.target????}); 
  },
  </code></pre>
  
  <p>The element and <code>data-</code> property render in html fine. Standard properties like <code>style</code> can be accessed as <code>event.target.style</code> fine.
  Instead of <code>event.target</code> I tried:</p>
  
  <pre><code> event.target.props.data.tag
   event.target.props.data["tag"]
   event.target.props["data-tag"]  
   event.target.data.tag
   event.target.data["tag"]
   event.target["data-tag"]
  </code></pre>
  
  <p>none of these worked. </p>