SessionStore extends flux.Store
This commit is contained in:
parent
2b4c87aca6
commit
da3cb0ee48
3 changed files with 19 additions and 14 deletions
|
@ -68,15 +68,15 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
componentWillMount: function() {
|
||||
this.sessionStore = sessionStore;
|
||||
this.sessionStore.on('update', this.setStateFromSessionStore);
|
||||
this._sessionStore = sessionStore;
|
||||
this._sessionStore.addListener(this._setStateFromSessionStore);
|
||||
|
||||
this.setStateFromSessionStore();
|
||||
this._setStateFromSessionStore();
|
||||
},
|
||||
|
||||
setStateFromSessionStore: function() {
|
||||
_setStateFromSessionStore: function() {
|
||||
this.setState({
|
||||
cachedPassword: this.sessionStore.getCachedPassword(),
|
||||
cachedPassword: this._sessionStore.getCachedPassword(),
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue