JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="test" placeholder="test"/>

JavaScript

jQuery(document).ready(function(){
	jQuery("input[type='text']").each(function(){
		var x = jQuery(this).attr("value");
		jQuery(this).focus(function(){
			if($(this).val()==x)
			{
				$(this).val('');
			}		
		});
		jQuery(this).blur(function(){
			if($(this).val()=="")
			{
				$(this).val(x);
			}
		});
	});
});