-
-
Save adelowo/a1bdbc01421643e3484165abed1833a9 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
import React, {Component} from 'react'; | |
import {View} from 'react-native'; | |
import { | |
Chat as StreamChat, | |
Channel, | |
MessageList, | |
MessageInput, | |
} from 'stream-chat-react-native'; | |
export default class Chat extends Component { | |
render() { | |
const channel = this.props.chatClient.channel('livestream', 'General'); | |
channel.watch(); | |
return ( | |
<StreamChat client={this.props.chatClient}> | |
<Channel channel={channel}> | |
<View style={{display: 'flex', height: '100%'}}> | |
<MessageList /> | |
<MessageInput /> | |
</View> | |
</Channel> | |
</StreamChat> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment