# ChannelList Hooks

`ChannelList` uses a small internal hook set to query channels, recover from reconnects, and read channel membership state. These hooks are not the primary customization surface for channel-list behavior; prefer the `ChannelList` event handlers, query options, and `WithComponents` overrides first.

## Best Practices

- Prefer `ChannelList` props over reimplementing internal hook behavior.
- Keep custom query logic close to `usePaginatedChannels` so pagination state stays consistent.
- Use the membership-state hooks for read-only UI, not for mutating channel state directly.
- Treat reconnect behavior as a reload concern and keep custom recovery handlers lightweight.
- Avoid re-adding the removed standalone listener hooks; they are now internal to the list shape logic.

## Hooks

| Hook                             | Description                                                                                                                                                                                                                                                 |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `useChannelMembersState`         | Reads the current `channel.state.members` map and keeps it in sync with membership, ban, delete, and presence events. Use it when a custom channel-list row or header needs live member data from a specific channel.                                       |
| `useChannelMembershipState`      | Reads the connected user’s `channel.state.membership` object and keeps it updated on membership changes. Use it when your UI needs the current user’s membership record for the active or previewed channel.                                                |
| `useConnectionRecoveredListener` | Registers a `connection.recovered` listener and runs a provided callback, which is how the default list triggers a reload when the SDK is not recovering channel state automatically.                                                                       |
| `usePaginatedChannels`           | Queries channels, manages `channels` and `hasNextPage`, and exposes `loadNextPage()` plus `setChannels()`. It is the default query/pagination model used by `ChannelList`, including support for a custom query function and active-channel initialization. |

## Current Customization Model

- event-driven list behavior is owned by `ChannelList`
- reconnect handling is available through `useConnectionRecoveredListener`
- query and pagination behavior is available through `usePaginatedChannels`
- membership-derived UI can use `useChannelMembersState` and `useChannelMembershipState`

If your app needs custom channel-row behavior, prefer `WithComponents` and `ChannelListItemUI` over rebuilding the deleted listener-hook layer.


---

This page was last updated at 2026-05-22T16:32:13.645Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/react/hooks/channel-list-hooks/](https://getstream.io/chat/docs/sdk/react/hooks/channel-list-hooks/).