JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tbody>
<tr id="item01">
<td><img width=40 height=40 id="image01" onclick="removeItem(this)" /></td>
</tr>
<tr id="item02">
<td><img width=40 height=40 id="image02" onclick="removeItem(this)" /></td>
</tr>
</tbody>
</table>
JavaScript
window.removeItem = function(self) {
$(self).parents('tr:first').remove();
}