Created
October 30, 2015 01:14
-
-
Save mariusk/722d00a39908198a73c6 to your computer and use it in GitHub Desktop.
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
let Start = React.createClass({ | |
childContextTypes: { | |
user: React.PropTypes.object | |
}, | |
getChildContext: function() { | |
return this.state; | |
}, | |
getInitialState: function() { | |
return {user: null}; | |
}, | |
componentDidMount: function() { | |
AppState.get('user').subscribe(user => { | |
this.setState({user: user}); | |
}); | |
}, | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment