JSFiddle - React, Tailwind, and code Playground

HTML

<button id="btn1" class="adder">CLICK 1</button>
<button id="btn2" class="adder">CLICK 2</button>
<div id="show"></div>

JavaScript

$('button.adder').on('click',

function () {
    var aid = $(this).attr('id');

    $('#show').append('<div><button class="removable" style="height: 30px;">' + aid + '</button></div>');

});

$('div#show').on('click', 'div button.removable',

function () {
    //console.log(this);
    $(this).remove();

    console.log($('div#show').children());
});