JSFiddle - React, Tailwind, and code Playground
HTML
<script>
function myFunction(){
var x = document.getElementById("input1");
var y = document.getElementById("input2");
y.value=x.value;
}
</script>
Input 1: <input type="text" id="input1" onkeydown="myFunction()"/>
Input 2: <input type="text" id="input2"/>