Skip to main content

useFetchFollowers

Overview

The useFetchFollowers hook fetches the list of users who are following the current logged-in user. It returns paginated results with detailed follow information including when each follow occurred.

Usage Example

Advanced Usage with Pagination

Parameters & Returns

Parameters

The hook returns a function that accepts an optional object with the following fields:
page
number
1
limit
number
20

Returns

The function returns a Promise that resolves to a FollowersResponse object containing:

FollowersResponse

followers
FollowerWithFollowInfo[]
Array of follower information
pagination
PaginationInfo
Pagination metadata

FollowerWithFollowInfo

PaginationInfo

Error Handling

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