demo/bundle.js
/**
             * Wrap a function so that if any code inside triggers state change,
             * the changes are queued using a (macro) task instead of a microtask.
             */
Wrap a function so that if any code inside triggers state change,
the changes are queued using a (macro) task instead of a microtask.
Wrap a function so that if any code inside triggers state change the changes are queued using a ( macro ) task instead of a microtask .
function withMacroTask (fn) {
              return fn._withTask || (fn._withTask = function () {
                useMacroTask = true;
                var res = fn.apply(null, arguments);
                useMacroTask = false;
                return res
              })
            }
function withMacroTask ( fn ) { return fn . _withTask || ( fn . _withTask = function ( ) { useMacroTask = true ; var res = fn . apply ( null , arguments ) ; useMacroTask = false ; return res } ) }
Wrap a function so that if any code inside triggers state change,
 the changes are queued using a (macro) task instead of a microtask.
Wrap a function so that if any code inside triggers state change the changes are queued using a ( macro ) task instead of a microtask .