Skip to content

Instantly share code, notes, and snippets.

@adelowo
Created January 4, 2020 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adelowo/ad6311c01ca681514dfb238413d68154 to your computer and use it in GitHub Desktop.
Save adelowo/ad6311c01ca681514dfb238413d68154 to your computer and use it in GitHub Desktop.
import React, {Component} from 'react';
import {SafeAreaView, View} from 'react-native';
import {
Chat,
Channel,
MessageList,
MessageInput,
} from 'stream-chat-react-native';
export default class ChatView extends Component {
state = {
isReady: false,
};
render() {
const channel = this.props.chatClient.channel(
'messaging',
'lambda-webhook-chat',
{
name: 'Webhook server',
}
);
return (
<Chat client={this.props.chatClient}>
<Channel channel={channel}>
<View style={{display: 'flex', height: '100%'}}>
<MessageList />
<MessageInput />
</View>
</Channel>
</Chat>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment