mirror of
https://github.com/zoriya/flood.git
synced 2025-12-20 06:05:15 +00:00
22 lines
511 B
JavaScript
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;
|