JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test">
    <div id="test2">
    blah blah
    
</div>
    <div id="test3">
    blah blah
    
</div>
    
</div>
<button>Call remove() on paragraphs</button>

JavaScript

$( "button" ).click(function() {
  $( "#test" ).remove();
});