JSFiddle - React, Tailwind, and code Playground

HTML

<input class="hidden" id="boodschap_id" value="7">
<button type="button" class="btn btn-sm" id="button_delete">DELETE</button>

JavaScript

$('#button_delete').click(function(e) {
        var id = $(this).closest('#boodschap_id');
        alert(id);
        e.preventDefault();
    });