Last active
February 14, 2016 20:51
-
-
Save spencercarli/247c26bbc5a3e02574da to your computer and use it in GitHub Desktop.
Meteor Authentication from React Native - UI: Sign In - loggedIn.js
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
// RNApp/app/loggedIn.js | |
/* | |
* Removed from snippet for brevity | |
*/ | |
export default React.createClass({ | |
/* | |
* Removed from snippet for brevity | |
*/ | |
handleSignOut() { | |
ddpClient.logout(() => { | |
this.props.changedSignedIn(false) | |
}); | |
}, | |
render() { | |
let count = Object.keys(this.state.posts).length; | |
return ( | |
<View> | |
<Text>Posts: {count}</Text> | |
<Button text="Increment" onPress={this.handleIncrement}/> | |
<Button text="Decrement" onPress={this.handleDecrement}/> | |
<Button text="Sign Out" onPress={() => this.props.changedSignedIn(false)} /> | |
</View> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment