ChannelList Hooks
The ChannelList
displays a list of channels
via a state variable of the same name. The SDK provides a variety of hooks that are used within the component to handle events related to updates for a channel
.
The list's state variable is then updated accordingly via the hooks.
Rather than exporting these individual hooks for customization purposes, many of these event listeners accept custom handler functions, which allows you to override the library's default event response behavior.
To view the list of these custom handler functions to override (if there is one), see the ChannelList
documentation.
Hooks
useChannelDeletedListener
A custom hook that handles the deletion of a channel from the list.
useChannelHiddenListener
A custom hook that handles the hiding of a channel from the list.
useChannelTruncatedListener
A custom hook that handles when a channel's history is truncated.
useChannelUpdatedListener
A custom hook that handles when a channel is updated.
useChannelVisibleListener
A custom hook that handles when a channel is made visible and added to the list.
useConnectionRecoveredListener
A custom hook that handles when connection is recovered and forces an update of the list.
useMessageNewListener
A custom hook that handles when connection is recovered and forces an update of the list.
useNotificationAddedToChannelListener
A custom hook that handles when a user is added to the list of channel members; moves channel to top of list and starts watching.
useNotificationMessageNewListener
A custom hook that handles when a new message is added to a channel; moves channel to top of list and starts watching.
useNotificationRemovedFromChannelListener
A custom hook that handles when a user is removed from the list of channel members; removes channel from list.
usePaginatedChannels
A custom hook that handles pagination and the querying of the channels for the list.
useUserPresenceChangedListener
A custom hook that handles when a user's status changes (ex: online, offline, etc.).
useMobileNavigation
A custom hook that handles the opening and closing of a mobile navigation via Javascript click event listeners, not Stream events.