JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<a href="#" class="link">Change input</a>
<div id="title"></div>
<div id="div">
<input id="title" style="width: 490px;"/>
</div>
</div>
</body>
</html>
JavaScript
$(function () {
$(".link").click(function () {
$("#div #title").val("test");
});
});