Skip to content

Instantly share code, notes, and snippets.

@adelowo

adelowo/Chat.js Secret

Created Feb 13, 2020
Embed
What would you like to do?
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 {
render() {
const channel = this.props.chatClient.channel('livestream', 'General');
channel.watch();
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
You can’t perform that action at this time.