JSFiddle - React, Tailwind, and code Playground

HTML

<div id="alpha">Now I'm here...</div>
<button type="button" onclick="removeText()">Remove</button>
<script>
     function removeText()
    {
        var element = document.getElementById("alpha");
        element.parentNode.removeChild(element);
        
    }
</script>