JSFiddle - React, Tailwind, and code Playground

HTML

<button class="update" value="test1">Update</button>
<button class="update" value="test2">Update</button>
<button class="update" value="test3">Update</button>

JavaScript

$(document).ready(function () {
    $(".update").click(function () {
        var updateId = this.text();
        alert(updateId);
    });
});