JSFiddle - React, Tailwind, and code Playground

JavaScript

Function.defer = function() {
        var __method = this, args = slice.call(arguments, 1);
        return window.setTimeout(function() {
         return __method.apply(__method, args);
        }, 0);
}
    
function doStuff(msg) {
  alert(msg);
}

    
doStuff("stuff").defer();