JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<html>
<body>
<label>Input A</label><input id="inputA" name="A" type="text">
<label>Input B</label><input id="inputB" name="B" type="text">
</body>
</html>
JavaScript
$(function() {
$("input[name='A']").on('change', function() {
$("input[name='B']").val( ($("input[name='A']").val() * 2) );
})
});