JSFiddle - React, Tailwind, and code Playground

by Travis Harris

HTML

<input type="text" id='theText' placeholder="hello">
<input type="button" value="clear" onclick='clearText'>

JavaScript

clearText = function(){
 document.getElementById('theText').value = "";
}