JSFiddle - React, Tailwind, and code Playground

HTML

<table>
<tbody>

<tr>
<td>foo 1</td>
<td><button  type="button" value="Remove" id="remove1"> Remove

</button></td>
</tr>
<tr>
<td>foo 2 </td>
<td><input  type="button" value="Remove" id="remove2"/> </td>
</tr>
</tbody>
</table>

JavaScript

$("table tr button").on('click', function(e){
alert('button');
   alert($(this).closest('td').parent()[0].sectionRowIndex);
});