JSFiddle - React, Tailwind, and code Playground

JavaScript

var input = '<input type="text" id="input"/>';
$('body').on('change', 'input', function(){
    alert(this.value);
});
setTimeout(function(){
    $('body').html(input);
}, 2000)