I have a React app with a table (with a variable number of rows). I want to be able to click a link or button in one cell of the table to add a class to the parent of that link/button.
Here's an example row in the table:
<tr>
<td>Sample</td>
<td className="num">40%</td>
<td><a>Accept</a></td>
</tr>
When I click "Accept", I want num (or the whole tr, if that's easier) to have a new class added. How can I do this? Because I have a variable number of rows I want to avoid using state.