JSFiddle - React, Tailwind, and code Playground

JavaScript

function test_func(call_from){
  var deferred = $.Deferred();
    console.log('started ==',call_from)
  setTimeout(function(){
    console.log("status in :",call_from + '  ' +  deferred.state());
    deferred.resolve();
  },5000);

  return deferred.promise();
};

test_func('first_call')
.then(function(){
	return test_func('second_Call')
  })
  .then(function(){
	return test_func('third_Call')
  })
  .then(function() {
     console.log('done');
   });