In-App UI
React
Hooks
useConnectedSlackChannels
useConnectedSlackChannels
The useConnectedSlackChannels
hook is used to retrieve Slack channels that are currently connected for the user.
Parameters#
This hook does not accept any parameters.
Returns#
A UseConnectedSlackChannelsReturn
object with the following properties:
channelsConnectedSlackChannel[]
Array of connected Slack channels.
isLoadingboolean
Whether connected channels are being loaded.
errorError | null
Error object if the request failed.
Example#
Basic usage#
The following example demonstrates how to use the useConnectedSlackChannels
hook to display connected Slack channels.