title: How do you make onClick parameters be saved per table row?
body: <p>My code is using semantic UI table and written in ReactJS. In my render function, I have a table with rows and every row I call a onClick function where I pass in an item. However, the item passed in to the onClick is always the last item, perhaps because onClick happens after rendering. How do I make it so that each row passes the correct item into my onClick function?</p>
  
  <pre><code>    for (var item in props.items) {
              rows.push(
                  &lt;Table.Row
                  onClick={() =&gt; {
                      handleClick(item);
                  }}&gt;
                      &lt;Table.Cell&gt;&lt;text className='tableEntry'&gt;{item}&lt;/text&gt;&lt;/Table.Cell&gt;
  </code></pre>