JSFiddle - React, Tailwind, and code Playground

HTML

<input type='text' value='enter...'>

JavaScript

$('input').focus(function() {
   if (this.value === this.defaultValue) {
      $(this).val("");
   }
}).blur(function(){
   if (this.value.length === 0) this.value = this.defaultValue;
});