js-waku/web-chat/src/App.tsx

33 lines
526 B
TypeScript
Raw Normal View History

2021-04-14 04:44:12 +00:00
import React from 'react';
import './App.css';
2021-04-16 01:32:00 +00:00
import Room from './Room';
2021-04-14 04:44:12 +00:00
2021-04-14 05:23:00 +00:00
interface Props {
}
interface State {
messages: string[]
}
class App extends React.Component<Props, State> {
constructor(props: Props) {
super(props);
this.state = {
messages: ['Here is a line', 'Here is another line']
};
}
render() {
return (
<div className='App'>
2021-04-16 01:32:00 +00:00
<div className='chat-room'>
<Room lines={this.state.messages} />
2021-04-14 05:23:00 +00:00
</div>
2021-04-14 05:13:55 +00:00
</div>
2021-04-14 05:23:00 +00:00
);
}
2021-04-14 04:44:12 +00:00
}
export default App;