JSFiddle - React, Tailwind, and code Playground
by rchern
HTML
<input type="text" name="s" id="search" value="Search for post">
JavaScript
$('#search').focus(function() {
if($(this).val() == 'Search for post')
$(this).val('');
});