JSFiddle - React, Tailwind, and code Playground

HTML

<form>
    <div class="repeatable">
        <table border="1">
            <tr>
                <td>
                    <input type="text" name="userInput[]" />
                </td>
            </tr>
        </table>
        <button class="repeat">Add Another</button>
    </div>
    <input type="submit" value="Submit" />
</form>

JavaScript

$(function () {
    $(".repeat").on('click', function () {
        var $self = $(this);
        $self.after($self.parent().clone());
        $self.remove();
    });
});