Created
December 9, 2014 00:42
-
-
Save flarnie/d49597ba811a83e09484 to your computer and use it in GitHub Desktop.
Flux TodoApp Sample 3
This file contains hidden or 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
// 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