Skip to content

Instantly share code, notes, and snippets.

@adelowo
Created April 16, 2020 13:35
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/a1bdbc01421643e3484165abed1833a9 to your computer and use it in GitHub Desktop.
Save adelowo/a1bdbc01421643e3484165abed1833a9 to your computer and use it in GitHub Desktop.
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