Skip to content

Instantly share code, notes, and snippets.

@ayberkanilatsiz
Created October 11, 2017 10:59
Show Gist options
  • Save ayberkanilatsiz/e0f84288d851e02aa6b3908ee40e6de9 to your computer and use it in GitHub Desktop.
Save ayberkanilatsiz/e0f84288d851e02aa6b3908ee40e6de9 to your computer and use it in GitHub Desktop.
app render func
render() {
const { userId, isReady } = this.state;
if(!isReady){
return this.renderUsernameView();
}
return (
<GiftedChat
messages={this.state.messages}
onSend={this.onSend}
onPressAvatar={ (user)=> alert(user.name)}
user={{
_id: userId,
}}
/>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment