JSFiddle - React, Tailwind, and code Playground

HTML

<input type='text' id='tb1' />
<input type='button' id='btn' value='Button' />

JavaScript

$(function() {
    $('#btn').click(function() { $("#tb1").focus();  });
    $("#tb1").change(function() { alert($(this).val()); });
 });