lib/dispatcher.js
function execute(_ref7) {
      var actionName = _ref7.actionName;
      var isPaused = _ref7.isPaused;

      var nextActionName = getNextActionName(actionName);
      var wasPaused = stores.redux.isPaused;

      /** TODO: CHECK LOCAL STATE HERE AND IF ITS BEEN ACTIVE, POSTPONE THE ACTION ABOUT TO BE EXECUTED */

      /** SCHEDULE THE NEXT ACTION IF IT EXISTS */
      var timeoutID = nextActionName && !isPaused ? schedule(nextActionName) : null;

      if (isPaused && !wasPaused) {
        log.info('pausing activity detection');
        detection.stop();
      }
      if (!isPaused && wasPaused) {
        log.info('unpausing activity detection');
        detection.start();
      }

      /** UPDATE THE STATE OF THE APP */
      setState(actionName, { actionName: actionName,
        isIdle: typeof nextActionName === 'undefined',
        isPaused: isPaused,
        timeoutID: timeoutID
      });

      /** EXECUTE THE USER DEFINED ACTION WITH REDUX THUNK ARGS + CONTEXT (LOG, START/STOP/RESET DISPATCHABLE ACTIONS) */
      getAction(actionName)(dispatch, getState, _getChildContext(context));
    }
function execute(_ref7) {
      var actionName = _ref7.actionName;
      var isPaused = _ref7.isPaused;

      var nextActionName = getNextActionName(actionName);
      var wasPaused = stores.redux.isPaused;

      /** TODO: CHECK LOCAL STATE HERE AND IF ITS BEEN ACTIVE, POSTPONE THE ACTION ABOUT TO BE EXECUTED */

      /** SCHEDULE THE NEXT ACTION IF IT EXISTS */
      var timeoutID = nextActionName && !isPaused ? schedule(nextActionName) : null;

      if (isPaused && !wasPaused) {
        log.info('pausing activity detection');
        detection.stop();
      }
      if (!isPaused && wasPaused) {
        log.info('unpausing activity detection');
        detection.start();
      }

      /** UPDATE THE STATE OF THE APP */
      setState(actionName, { actionName: actionName,
        isIdle: typeof nextActionName === 'undefined',
        isPaused: isPaused,
        timeoutID: timeoutID
      });

      /** EXECUTE THE USER DEFINED ACTION WITH REDUX THUNK ARGS + CONTEXT (LOG, START/STOP/RESET DISPATCHABLE ACTIONS) */
      getAction(actionName)(dispatch, getState, _getChildContext(context));
    }
function execute ( _ref7 ) { var actionName = _ref7 . actionName ; var isPaused = _ref7 . isPaused ; var nextActionName = getNextActionName ( actionName ) ; var wasPaused = stores . redux . isPaused ; /** TODO: CHECK LOCAL STATE HERE AND IF ITS BEEN ACTIVE, POSTPONE THE ACTION ABOUT TO BE EXECUTED */ /** SCHEDULE THE NEXT ACTION IF IT EXISTS */ var timeoutID = nextActionName && ! isPaused ? schedule ( nextActionName ) : null ; if ( isPaused && ! wasPaused ) { log . info ( 'pausing activity detection' ) ; detection . stop ( ) ; } if ( ! isPaused && wasPaused ) { log . info ( 'unpausing activity detection' ) ; detection . start ( ) ; } /** UPDATE THE STATE OF THE APP */ setState ( actionName , { actionName : actionName , isIdle : typeof nextActionName === 'undefined' , isPaused : isPaused , timeoutID : timeoutID } ) ; /** EXECUTE THE USER DEFINED ACTION WITH REDUX THUNK ARGS + CONTEXT (LOG, START/STOP/RESET DISPATCHABLE ACTIONS) */ getAction ( actionName ) ( dispatch , getState , _getChildContext ( context ) ) ; }
Responsible for executing an action
Responsible for executing an action