The useCounts hook provides a way to fetch various notification counts, including unread, unseen, and total counts. This hook is useful for displaying notification badges and indicators in your application.
Hook Parameters
Return Value
Example Usage
Here’s how to use the useCounts hook to fetch and display notification counts:
With Store ID
You can filter counts for a specific store:
With Query Filters
You can also apply additional filters using the query parameter:
refetch function can be used to refetch updated counts after notifications are marked as read/unread/archived etc.