JSFiddle - React, Tailwind, and code Playground

by Rich Costello

HTML

<input type="text" id="demo"/>
<button>button 1</button>
<button>button 2</button>

JavaScript

$('button').click(function(){
      $('input[type="text"]').val("");
});