JSFiddle - React, Tailwind, and code Playground

HTML

<form name="formulario" action="" method="post">
    Digite algo: <input type="text" name="string">
</form>

JavaScript

document.onchange = function(){
	document.formulario.submit();
}