JSFiddle - React, Tailwind, and code Playground

by johnny000

JavaScript

function taskThatTakesSomeTime(callback){
    // Do stuff here that takes time
    // when done call the callback
    callback();
}

function ajax(){
    //do your ajaxrequest here
    alert("calling ajax");
}