Closed paOol closed 3 years ago
instead of
{messages.map((x: Chat, i: number) => { <p key= ... > asdfa </p>
there should be a component that takes in the props ( {message;Chat} )
so that the code is cleaner in Home() and to allow further customization in the chatmessage component.
it should look something like
{messages.map((x: Chat, i: number) => { <ChatMessage data={x} /> })
instead of
there should be a component that takes in the props ( {message;Chat} )
so that the code is cleaner in Home() and to allow further customization in the chatmessage component.
it should look something like