JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<thead>
<tr><th>header</th></tr>
</thead>
<tbody id="tbodyid">
<tr><td>something</td></tr>
</tbody>
</table>
<a href="#">Empty</a>
JavaScript
$("a").click(function() {
$("#tbodyid").empty();
$("#tbodyid").append($('tr').append($('td').text('test?')));
});