JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
    <input type="button" class="dynamically_added" value="button1">
</div>

JavaScript

// Listen for a button within .container to get clicked because .container is not dynamic
$('.container').on('click', 'input[type="button"]', function () {
    alert($(this).val());
});

// we bound the click listener to .container so any buttons inside of it get noticed
$('.container').append('<input type="button" class="dynamically_added" value="button2">');
$('.container').append('<input type="button" class="dynamically_added" value="button3">');
$('.container').append('<input type="button" class="dynamically_added" value="button4">');
$('.container').append('<input type="button" class="dynamically_added" value="button5">');