JSFiddle - React, Tailwind, and code Playground
HTML
<div id="inputs">
<input class="inputs" type="text" placeholder='type in me' /><br />
</div>
<button type="button" id="button">Add</button>
JavaScript
$(document).ready(function(){
$("#button").click(function(){
$("#inputs").append("<input class='inputs' type='text' /><br />");
$(".inputs").each(function() {
$(this).val("done with each");
});
});
});