JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
    <li>hello <a class="del" href="#">del</a></li>
    <li>new <a class="add" href="#">add</a></li>
</ul>

JavaScript

$(".add").click( function() {
    $(this.parentNode).prev("li")
    .clone(true)
    .insertBefore(this.parentNode);
    return false;
});

$(".del").click( function() {
    $(this).closest("li").remove();
    return false;
});