JSFiddle - React, Tailwind, and code Playground

HTML

<table border='1'>
    <tr class="row">
        <td>Cell</td>
        <td>Cell</td>
    </tr>
    <tr class="row">
        <td>Cell</td>
        <td>Cell</td>
    </tr>
</table>

JavaScript

$(".row").on("click", function(ev){
    el = $(this);
    el.css("background-color", "red");
})