JSFiddle - React, Tailwind, and code Playground
by rmurphey
JavaScript
var asyncThing = function() {
var dfd = new dojo.Deferred();
setTimeout(function() { dfd.resolve(true); }, 1000);
return dfd;
};
var handleIt = function(result) {
console.log('handleIt got', result);
return !result;
};
var doSomethingElse = function(result) {
console.log('doSomethingElse got', result);
};
dojo.when(asyncThing(), handleIt).then(doSomethingElse);