JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="user name" id="userName" />

JavaScript

$(function() {
    $('#userName').click(function() {
        $(this).val('').unbind('click');
        $(this).focus();
    });
});