title: Getting the id of a clicked element from rendered list
body: <p>What is the best way to get an id from a clicked element of a list?
  I am trying to render a list of items and then display an item detail view for the clicked item.</p>
  
  <p>e.g</p>
  
  <pre><code>render() {
    let list = data.map((obj) =&gt; {
                 return &lt;div key={obj[id]} id={obj[id]} onClick={this.handleClick}&gt;&lt;/div&gt;         
               });
    return &lt;div&gt;{list}&lt;/div&gt;;
  }
  </code></pre>
  
  <p>How do I get the id of the clicked element for use in another component?</p>