Skip to content

Instantly share code, notes, and snippets.

@flarnie
Created December 9, 2014 00:42
Show Gist options
  • Save flarnie/d49597ba811a83e09484 to your computer and use it in GitHub Desktop.
Save flarnie/d49597ba811a83e09484 to your computer and use it in GitHub Desktop.
Flux TodoApp Sample 3
// The '_onSave' callback calls the 'TodoActions' method to create an action
// ...
/**
* Event handler called within TodoTextInput.
* Defining this here allows TodoTextInput to be used in multiple places
* in different ways.
* @param {string} text
*/
_onSave: function(text) {
if (text.trim()){
TodoActions.create(text);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment