Skip to content

Instantly share code, notes, and snippets.

@flarnie
Created December 9, 2014 00:41
Show Gist options
  • Save flarnie/efd2c9b91da1bc0eb67e to your computer and use it in GitHub Desktop.
Save flarnie/efd2c9b91da1bc0eb67e to your computer and use it in GitHub Desktop.
Flux TodoApp Sample 2
// Saving a new ToDo calls the '_onSave' callback
// ...
var Header = React.createClass({
/**
* @return {object}
*/
render: function() {
return (
<header id="header">
<h1>todos</h1>
<TodoTextInput
id="new-todo"
placeholder="What needs to be done?"
onSave={this._onSave}
/>
</header>
);
},
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment