Skip to main content

Overview

Returns a function that fetches the paginated list of followers for any user, identified by userId. This is a public endpoint — authentication is not required. For fetching your own followers, see useFetchFollowers.

Usage Example

Parameters

The hook returns a function. That function accepts:
userId
string
required
The ID of the user whose followers to fetch.
page
number
Page number to fetch. Defaults to 1.
limit
number
Number of results per page. Defaults to 20.
query
string
Optional search term. Filters the list to users whose username or name contains this text (case-insensitive). When omitted, no filtering is applied.
searchFields
string
Restricts which field query matches against — username or name. When omitted, query matches either field.

Returns

Returns a PaginatedResponse containing an array of follower entries:
data
FollowerWithFollowInfo[]
Array of follower entries.
pagination
object
Pagination metadata including currentPage, totalPages, totalCount, hasNextPage, and hasPreviousPage.