We’ve implemented chat using @sendbird/uikit-react and recently migrated from the deprecated Channel/ChannelContext components to GroupChannel/GroupChannelContext components.
When we activated the changes one of our internal users reports that old messages show up after sending or receiving a message.
When we turned off the GroupChannel/GroupChannelContext update, the old messages no longer display at the end of the list of messages.
To be clear, this issue only occurs using the new GroupChannel/GroupChannelContext components.
I’ve been over the docs and the new code several times and can’t find anything that looks like it would cause this issue.
I’ve referenced:
The old & new code follow the same pattern:
We render the entire Channel/GroupChannel component with props to render the message, channelHeader, messageInput, and placeholderEmpty components.
...
const renderMessage = (msgProps) => (<CustomChatMessage {...msgProps} />
const renderMessageInput = (msgInputProps) => (<CustomChatMessageInput {...msgInputProps} />
const channelComponentProps = {
channelUrl: channelUrl,
renderMessage: renderMessage,
renderChannelHeader: renderChannelHeader,
renderMessageInput: renderMessageInput,
isMessageGroupingEnabled: true,
isReactionEnabled: !readonly,
};
if (isEnabled('use-group-channel-component')) {
return <GroupChannel {...channelComponentProps} />;
}
return <Channel {...channelComponentProps} />;
All of the custom rendered components are using the appropriate context via the useChannelContext or useGroupChannelContext hooks.
We’re not doing anything to manipulate the messages retrieved from sendbird.
[uikit-react version]
3.14.14
[sdk version]
3.1.33
[Frequency]
This happens every time we turn on the GroupChannel/GroupChannelContext code.
[Current impact]
This is preventing us from migrating from the deprecated components.