Files
flood/client/source/scripts/dispatcher/AppDispatcher.js

22 lines
511 B
JavaScript

import {Dispatcher} from 'flux';
class FloodDispatcher extends Dispatcher {
dispatchUIAction(action) {
if (action.type == null) {
console.trace('Undefined action.type', action);
}
this.dispatch({source: 'UI_ACTION', action});
}
dispatchServerAction(action) {
if (action.type == null) {
console.trace('Undefined action.type', action);
}
this.dispatch({source: 'SERVER_ACTION', action});
}
}
let AppDispatcher = new FloodDispatcher();
export default AppDispatcher;