JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" name="email" id="email" />
           
<input type="text" name="mail" id="mail"/>

JavaScript

$(function() {                                       // <== Doc Ready
    $("#email").change(function() {                  // When the email is changed
        $('#mail').val(this.value);                  // copy it over to the mail
    });
});