Last active
May 23, 2017 18:01
-
-
Save qrobin/5b52c4557dd6d5f861a2dd841ceceb26 to your computer and use it in GitHub Desktop.
This file contains 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
class App extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
loggedIn: this.props.loggedIn | |
}; | |
} | |
componentDidMount() { | |
// Here I have some logic with local database and the 'loggedIn' prop | |
} | |
render() { | |
return this.props.loggedIn ? <MainDrawer {...this.props} /> : <AuthStack />; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment