Skip to content

Commit

Permalink
Firebase - Section 7
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGrider committed Jun 4, 2015
1 parent 952235f commit 65eae7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion todos/src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var App = React.createClass({
<h2 className="text-center">
To-Do List
</h2>
<Header />
<Header itemsStore={this.firebaseRefs.items} />
</div>
</div>
}
Expand Down
7 changes: 6 additions & 1 deletion todos/src/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ module.exports = React.createClass({
</div>
},
handleClick: function() {
console.log(this.state.text);
this.props.itemsStore.push({
text: this.state.text,
done: false
});

this.setState({text: ''});
},
handleInputChange: function(event) {
this.setState({text: event.target.value});
Expand Down

0 comments on commit 65eae7c

Please sign in to comment.