scrimba
Building a chat app with React and Chatkit
Adding autoscroll
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

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

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

export default MessageList
Console
index.html#
-5:50