Missing 'ChannelListTeamProps' in stream-chat-react
In typescript, I am getting this error '"stream-chat-react"' has no exported member named 'ChannelListTeamProps'. Did you mean 'ChannelSearchProps'?
Hello @gozanohesron, ChannelListTeam is a deprecated and removed component, therefore its props type no longer exists. Feel free to use ChannelListMessengerProps instead, as this pertains to the default List prop on the ChannelList component.
I'm going to close as this should fix your problem, but I'll continue to receive notifications on this issue if you have further questions, thanks!
@DanC5 can you update the demo code as it is still using said code? I am trying to study the demo code but I am having problem with that specific line. After putting the component you mentioned, I got new error pertaining to the children property
Which demo are you referring to?
@DanC5 this one
https://github.com/GetStream/website-react-examples/tree/master/social-messenger
Oh I see, social-messaging-ts in the website examples repo. I'll push that change up right now
@DanC5 yes yes, the TS version of that app. I am getting errors for that
Just updated, https://github.com/GetStream/website-react-examples/blob/master/social-messenger-ts/src/components/MessagingChannelList/MessagingChannelList.tsx#L22.
Are you wrapping the type in React.FC like in the example? https://github.com/GetStream/website-react-examples/blob/master/social-messenger-ts/src/components/MessagingChannelList/MessagingChannelList.tsx#L26
You need this so TypeScript knows the component will render children. If you're not using React.FC then you can wrap the type in PropsWithChildren, imported from React.
PropsWithChildren<ChannelListMessengerProps>
@DanC5 I am just following the demo code as it is. I'm just studying it how to implement on our own app
Hi @DanC5 would you mind helping me, I am getting last two errors with the ff files

or perhaps should I report this on the example repository?
For the second one, you're likely on a newer version of the library than is powering that example. The latestMessage prop on the Preview UI component can now be a React element, whereas it used to only be a string. This is to allow for message translation in the channel preview text. If you're doing something like this...
type Props = ChannelPreviewUIComponentProps & {
channel: Channel;
setIsCreating: React.Dispatch<React.SetStateAction<boolean>>;
latestMessage?: string;
setActiveChannel?: ChatContextValue['setActiveChannel'];
};
Remove the latestMessage?: string type and let me know if that fixes the second one
@DanC5 it did fix the issue for the second one
For the first, in the overrideSubmitHandler function, change the type on the message param from...
{
attachments: Attachment[];
mentioned_users: UserResponse[];
text: string;
parent?: StreamMessage;
}
to
MessageToSend, which you'll need to import from the library
@DanC5 thank you very much for the assistance