Skip to content

Commit

Permalink
Changes components to interact with alt
Browse files Browse the repository at this point in the history
Changing some API terminology so this plays well with alt. Alt uses
`listen` and `unlisten` for the store's listener.
  • Loading branch information
goatslacker committed Dec 27, 2014
1 parent 0129baa commit e05a4e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions examples/chat/js/components/MessageSection.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ var MessageSection = React.createClass({

componentDidMount: function() {
this._scrollToBottom();
MessageStore.addChangeListener(this._onChange);
ThreadStore.addChangeListener(this._onChange);
MessageStore.listen(this._onChange);
ThreadStore.listen(this._onChange);
},

componentWillUnmount: function() {
MessageStore.removeChangeListener(this._onChange);
ThreadStore.removeChangeListener(this._onChange);
MessageStore.unlisten(this._onChange);
ThreadStore.unlisten(this._onChange);
},

render: function() {
Expand Down
8 changes: 4 additions & 4 deletions examples/chat/js/components/ThreadSection.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ var ThreadSection = React.createClass({
},

componentDidMount: function() {
ThreadStore.addChangeListener(this._onChange);
UnreadThreadStore.addChangeListener(this._onChange);
ThreadStore.listen(this._onChange);
UnreadThreadStore.listen(this._onChange);
},

componentWillUnmount: function() {
ThreadStore.removeChangeListener(this._onChange);
UnreadThreadStore.removeChangeListener(this._onChange);
ThreadStore.unlisten(this._onChange);
UnreadThreadStore.unlisten(this._onChange);
},

render: function() {
Expand Down

0 comments on commit e05a4e0

Please sign in to comment.