In-App UI
React
Hooks
useSlackChannels
useSlackChannels
The useSlackChannels
hook is used to retrieve available Slack channels for a connected workspace.
Parameters#
This hook does not accept any parameters.
Returns#
A UseSlackChannelsReturn
object with the following properties:
channelsSlackChannel[]
Array of available Slack channelsisLoadingboolean
Whether channels are being loadederrorError | null
Error object if the request failedExample#
Basic usage#
The following example demonstrates how to use the useSlackChannels
hook to display available Slack channels.