import { WithComponents } from "stream-chat-react-native";
<WithComponents
overrides={{ ScrollToBottomButton: CustomScrollToBottomButton }}
>
<Channel channel={channel}>
<MessageList />
<MessageComposer />
</Channel>
</WithComponents>;ScrollToBottomButton
Renders the floating button that scrolls MessageList to the latest message.
Best Practices
- Only render the button when
showNotificationis true to avoid layout noise. - Keep the button lightweight and unobtrusive for better UX.
- Use
unreadCountto provide meaningful context, but clamp large values. - Ensure
onPressscrolls to the latest message rather than just bottom offset. - Customize via
WithComponentsinstead of modifying internal components.
General Usage
Replace the default UI via WithComponents.
Props
| Prop | Description | Type |
|---|---|---|
onPress | Press handler. | function |
showNotification | When false, the button is not rendered. | boolean |
unreadCount | Unread count for the current channel. | number |