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 channels.
isLoadingboolean
Whether channels are being loaded.
errorError | null
Error object if the request failed.
Example
#Basic usage
#The following example demonstrates how to use the useSlackChannels hook to display available Slack channels.