mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-08 13:44:25 +02:00
[Flux] Initial flux land
This commit is contained in:
parent
5df3d43c4f
commit
eba404c595
5 changed files with 105 additions and 3 deletions
24
src/js/dispatcher/AppDispatcher.js
Normal file
24
src/js/dispatcher/AppDispatcher.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
var AppConstants = require('../constants/AppConstants');
|
||||
var Dispatcher = require('flux').Dispatcher;
|
||||
|
||||
var PayloadSources = AppConstants.PayloadSources;
|
||||
|
||||
var AppDispatcher = new Dispatcher();
|
||||
|
||||
AppDispatcher.handleViewAction = function(action) {
|
||||
this.dispatch({
|
||||
source: PayloadSources.VIEW_ACTION,
|
||||
action: action
|
||||
});
|
||||
};
|
||||
|
||||
AppDispatcher.handleURIAction = function(action) {
|
||||
this.dispatch({
|
||||
source: PayloadSources.URI_ACTION,
|
||||
action: action
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = AppDispatcher;
|
Loading…
Add table
Add a link
Reference in a new issue