JSFiddle - React, Tailwind, and code Playground

HTML

<input id="one" type="text" onchange="update();" />
<input id="two" type="text" />

JavaScript

update = function() {
  var one = document.getElementById('one');
   var two = document.getElementById('two');    

  two.value = parseInt(one.value) * 2;
}