JSFiddle - React, Tailwind, and code Playground
HTML
<button id="first">Click me first</button>
JavaScript
$('#first').click(function(){
$('body').append('<button id="second">Now click me</button>');
});
$('#second').click(function(){
$(this).hide();
});