useMsTeamsChannels
The useMsTeamsChannels hook is used to retrieve available Microsoft Teams channels for a specific team. This hook must be used within a KnockMsTeamsProvider.
Parameters
#Accepts an object with the following properties:
Optional ID of the Microsoft Teams team to get channels for. If not provided, no channels will be fetched.
Optional query options for filtering and selecting channel fields.
Returns
#Returns an object with the following properties:
Array of available Microsoft Teams channels.
Whether channels are being loaded or revalidating.
Function to manually refetch the channels.
Example
#Basic usage
#The following example demonstrates how to use the useMsTeamsChannels hook to display available Microsoft Teams channels.
With query options
#You can customize the query with filtering and field selection options: