JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" value="to clean"/>
<input type="button" value="clean"/>
JavaScript
$('[type="button"]').mousedown(function(event) {
event.preventDefault();
$('[type="text"]').val('');
});