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 channelsisLoadingboolean
Whether connected channels are being loadederrorError | null
Error object if the request failedExample#
Basic usage#
The following example demonstrates how to use the useConnectedSlackChannels
hook to display connected Slack channels.