Trying to render a custom name above the chatBubble. I am getting props.isSameUser not a function inside the renderBubble function. Which contradicts what others have been getting. I am not sure if its typed out properly but it shouldn't matter. Another issue is that when I render the text it gets rendered in the center and I cannot find any way to align it properly.
renderBubble = (props: Readonly<AvatarProps<IMessage>>) => {
return (
<View>
<Text>
{!props.isSameUser(props.currentMessage, props.previousMessage) &&
props.currentMessage.user.name}
</Text>
<Bubble
{...props}
/>
</View>
)
}
<GiftedChat
renderBubble={this.renderBubble}
/>
some examples where it works:
https://github.com/FaridSafi/react-native-gifted-chat/pull/448#issuecomment-451661928