messages (Message[]) - the array of messages to display, required
user (User) - the current user, required
onSend (Function) - the function that runs when the user presses the send button, required
inputPlaceholder (string) - the placeholder of the input, defaults to "Type a message..."
dateFormat (string) - the format of the date in the message bubble, defaults to "hh:mm" (check date-fns docs to see valid formats)
dayMessageDateFormat (string) - the format of the new day message, defaults to "MMMM do, yyyy" (check date-fns docs to see valid formats)
showAvatarOnEveryMessage (boolean) - show avatar on every message, even if the same user sent a message twice in a row, defaults to false.
renderInput (Function) - render custom view for the message input. example down.
renderSend (Function) - render custom send button. example down.
renderMessage (Function) - render custom message
renderAvatar (Function) - render custom avatar in the message, don't use with renderMessage
renderText (Function) - render custom text in the message, don't use with renderMessage
renderDate (Function) - render custom date in the message, don't use with renderMessage
useMessaging hook
Are your messages built different than the messages in the Message interface? That's why I made the useMessaging hook.
You have to give it an array of the original message objects, an object of the field names in the original message and a function (or an async function!) to get the user.