JSFiddle - React, Tailwind, and code Playground

HTML

<script>
    function Create_new_event ()
    {
        url = "missing.php";

        $.post(url, {
        }, function(hasil) {
            alert (hasil);
        });
    }

    $(document).ajaxError(function(event, request, settings, err)  {         
        console.log( 'Server returned '+request.status+': '+request.statusText );
    });

</script>

<button onClick="Create_new_event ();">Send</button>