JSFiddle - React, Tailwind, and code Playground

HTML

<div id="lorem">
    This is the text that should change
</div>

<div id="impsum">
    <ul>
    <li>This is the text that will replace the other piece of text. I need to find a function that will just copy the text in here - not the whole li with the bullet as well.</li>
    </ul>
</div>

JavaScript

$(document).ready(function() {
    $("li").click(function() {
        $("#lorem").replaceWith($(this));
        //This works to replace the text, however I just can't find something that will let me keep the "li" element and just copy the text within the "li" element. 
    });
});