Skip to content

Conversation

@bang9
Copy link
Contributor

@bang9 bang9 commented Feb 25, 2024

  • Resolved an infinite loop issue occurring when using the GroupChannel/components/Message, Channel/components/Message in the renderMessage method of the GroupChannel,Channel module.
  • The renderMessage method of the GroupChannel module no longer nests messages under the Message component. If a container element for the Message component is needed, use it as follows:
     import { GroupChannel } from '@sendbird/uikit-react/GroupChannel';
     import { Message } from '@sendbird/uikit-react/GroupChannel/components/Message';
      const GroupChannelPage = () => {
        return (
          <GroupChannel
            renderMessage={(props) => {
              return (
                <Message message={props.message}>
                  <div>{props.message.messageId}</div>
                </Message>
              )
            }}
          />
        )
      })
  • The renderMessage prop of the Channel/components/Message and GroupChannel/components/Message components has been deprecated. Instead, use children prop to customize message sub-elements.
    <Message message={props.message}>
      <div>{props.message.messageId}</div>
    </Message>
  • Added detailed comments for customizing-related props in GroupChannel module.

@bang9 bang9 self-assigned this Feb 25, 2024
@bang9 bang9 force-pushed the fix/renderMessage-prop branch from d99144f to 0fd1bd7 Compare February 25, 2024 16:17
Copy link
Contributor

@chohongm chohongm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@bang9 bang9 added the v3.12.1 label Feb 26, 2024
@bang9 bang9 merged commit 8ca1f97 into main Feb 26, 2024
@bang9 bang9 deleted the fix/renderMessage-prop branch February 26, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants