JSFiddle - React, Tailwind, and code Playground

HTML

<input id="CustomQuestionText" type="text" />
<input id="CustomButton" type="submit" />
<table id="CustomPickedTable">
    <tbody>
    </tbody>
</table>

JavaScript

$('#CustomButton').click(function() {
        $('#CustomPickedTable tbody').append(
            $('<tr/>', {
                click: function() {
                    $(this).remove()
                },
                html: $("<td />", {
                    html: $("#CustomQuestionText").val(),
                    'data-attr-id': 5
                    
                })
            })
        );
        return false;
    });