Created
September 30, 2014 21:00
-
-
Save koistya/c79956852b36f3e0d431 to your computer and use it in GitHub Desktop.
Flux Action Creator Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var AppDispatcher = require('../AppDispatcher'); | |
var TodoActions = { | |
ActionTypes: { | |
TODO_CREATE: 'TODO_CREATE' | |
}, | |
create: function(text) { | |
AppDispatcher.handleViewAction({ | |
actionType: this.ActionTypes.TODO_CREATE, | |
text: text | |
}); | |
} | |
} | |
module.exports = TodoActions; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment