JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="foo" />
JavaScript
document.querySelector("#foo").addEventListener('textInput', function () {
alert('Value changed!');
});
// Hey, but it must be when I type, but without onkeypress, because it'll be a virtual keyboard.