useSlackConnectionStatus
The useSlackConnectionStatus hook is used to check and manage the current Slack connection status for a user. This hook is typically used internally by the KnockSlackProvider and is not commonly used directly in application code.
Parameters
#The authenticated Knock client instance.
The Knock channel ID for the Slack integration.
The tenant ID for multi-tenant applications.
Returns
#Returns an object with the following properties:
The current connection status: 'connecting' | 'connected' | 'disconnected' | 'error' | 'disconnecting'.
Function to update the connection status.
Error message if the connection check failed.
Function to set an error message.
Label for the current action being performed.
Function to set an action label.
Example
#Basic usage
#This hook is typically used internally by the KnockSlackProvider. If you need to access the connection status in your components, use the useKnockSlackClient hook instead:
Advanced usage
#If you need to use this hook directly: