Skip to content

Instantly share code, notes, and snippets.

@koistya
Created September 30, 2014 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koistya/c79956852b36f3e0d431 to your computer and use it in GitHub Desktop.
Save koistya/c79956852b36f3e0d431 to your computer and use it in GitHub Desktop.
Flux Action Creator Sample
'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