scrimba
Building a chat app with React and Chatkit
Message component
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Message component
Expand for more info
components
MessageList.js
run
preview
console
import React from 'react'

class MessageList extends React.Component {
render() {
return (
<div className="message-list">
{this.props.messages.map((message, index) => {
return (
<div key={index} className="message">
<div className="message-username">{message.senderId}</div>
<div className="message-text">{message.text}</div>
</div>
)
})}
</div>
)
}
}

export default MessageList
Console
index.html
-4:33