JSFiddle - React, Tailwind, and code Playground

by Lucas Silva

HTML

<input type="test" id="textUl" />
<button id="appendButton">Incrementar</button>
<ul class="listLi"></ul>

JavaScript

$('#appendButton').click(function(){
    var text = $('#textUl').val();
    if(text.length){
        $('<li />', {html: text, href: text}).appendTo('ul.listLi')
    }
});