> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Fetch User Followers Count

# `useFetchUserFollowersCount`

## Overview

The `useFetchUserFollowersCount` hook is used to retrieve the number of followers for a specific user within the current project. This is useful for displaying follower counts in user profiles or social features.

## Usage Example

```tsx theme={null}
import { useFetchUserFollowersCount } from "@replyke/react-js";

function FollowerCountDisplay({ userId }: { userId: string }) {
  const fetchUserFollowersCount = useFetchUserFollowersCount();

  const handleFetchFollowersCount = async () => {
    try {
      const { count } = await fetchUserFollowersCount({ userId });
      console.log(`User has ${count} followers.`);
    } catch (error) {
      console.error("Failed to fetch followers count:", error.message);
    }
  };

  return (
    <button onClick={handleFetchFollowersCount}>Get Followers Count</button>
  );
}
```

## Parameters & Returns

### Parameters

The hook returns a function that accepts the following parameter:

<ParamField path="userId" type="string" required>
  The ID of the user to fetch follower count for.
</ParamField>

### Returns

The function resolves with an object containing the follower count:

<ResponseField name="response.count" type="number">
  The number of followers.
</ResponseField>
