I want to render my ChatBubble component after an amount of time. But it does not return my component. Instead it returns numbers 2 and 3 as a string.
const Conversation = ({data}) => {
const { messages } = data;
return (
<div>
{
messages.map(data => {
return setTimeout(() => {
return <ChatBubble key={uniqid()} data={data}/>
}, data.delay);
})
}
</div>
);
}
export default Conversation;