index.js
function createScheduleStatusUpdate() {
  var isChanging = false;
  var shouldUpdate = false;

  function update(self, fn) {
    raf(function() {
      if (self.isMounted()) fn();
      isChanging = false;
      if (shouldUpdate) update(self, fn);
      shouldUpdate = false;
    });
  }

  return function _scheduleStatusUpdate(fn) {
    if (isChanging) return shouldUpdate = true;
    var self = this;
    isChanging = true;
    update(self, fn || self._updateChildrenLoadingStatus);
  };
}
function createScheduleStatusUpdate() {
  var isChanging = false;
  var shouldUpdate = false;

  function update(self, fn) {
    raf(function() {
      if (self.isMounted()) fn();
      isChanging = false;
      if (shouldUpdate) update(self, fn);
      shouldUpdate = false;
    });
  }

  return function _scheduleStatusUpdate(fn) {
    if (isChanging) return shouldUpdate = true;
    var self = this;
    isChanging = true;
    update(self, fn || self._updateChildrenLoadingStatus);
  };
}
function createScheduleStatusUpdate ( ) { var isChanging = false ; var shouldUpdate = false ; function update ( self , fn ) { raf ( function ( ) { if ( self . isMounted ( ) ) fn ( ) ; isChanging = false ; if ( shouldUpdate ) update ( self , fn ) ; shouldUpdate = false ; } ) ; } return function _scheduleStatusUpdate ( fn ) { if ( isChanging ) return shouldUpdate = true ; var self = this ; isChanging = true ; update ( self , fn || self . _updateChildrenLoadingStatus ) ; } ; }
Create a schedule status update function that is debounced
Create a schedule status update function that is debounced