Created
July 4, 2022 14:49
-
-
Save koss-lebedev/e72e4360d093e564312b42e5a844844d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const Chat = (messages, props) => { | |
// ... | |
return ( | |
<ul> | |
{messages.map(message => { | |
const MessageComponent = messageFactory.render(message) | |
return <MessageComponent key={message.id} /> | |
})} | |
</ul> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment