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(){
	test_func('second_Call')
  }).then(function(){
	test_func('third_Call')
  })