16 lines
357 B
JavaScript
16 lines
357 B
JavaScript
var Dispatcher = require('flux').Dispatcher;
|
|
|
|
// Create dispatcher instance
|
|
var AppDispatcher = new Dispatcher();
|
|
|
|
// Convenience method to handle dispatch requests
|
|
AppDispatcher.handleAction = function(action) {
|
|
this.dispatch({
|
|
source: 'VIEW_ACTION',
|
|
action: action
|
|
});
|
|
|
|
console.log("Dispatching:", action);
|
|
}
|
|
|
|
module.exports = AppDispatcher; |