Skip to main content

useFetchFollowingCount

Overview

The useFetchFollowingCount hook fetches the total number of users that the current logged-in user is following. This is useful for displaying following counts in user profiles or dashboard statistics.

Usage Example

Advanced Usage with State

Usage in Profile Dashboard

Parameters & Returns

Parameters

The hook returns a function that takes no parameters.

Returns

The function returns a Promise that resolves to an object containing:
count
number
The total number of users you are following

Error Handling

The hook will throw errors in the following cases:
  • No project is specified
  • No user is logged in

Use Cases

This hook is commonly used in:
  • User profile pages to display following counts
  • Dashboard statistics and analytics
  • Social media style metrics
  • Navigation badges showing following numbers
  • User engagement tracking
  • Profile completion indicators