Skip to main content

Overview

Returns a function that fetches the paginated list of users the currently authenticated user follows. Each entry is a follow row: the follow record’s id, the followed user as user, and createdAt. For fetching another user’s following list, see useFetchFollowingByUserId.
Users with a block between them and you, in either direction, are excluded from the results. Requires the moderation bundle.

Usage Example

Parameters

The hook returns a function. That function accepts:
number
Page number to fetch. Defaults to 1.
number
Number of results per page: a whole number from 1 to 100. Defaults to 20. A larger value is rejected with 400 follow/invalid-query, never lowered to 100.
string
Optional search term. Filters the list to users whose username or name contains this text (case-insensitive). When omitted or blank, no filtering is applied: a blank query is left out of the request, and searchFields with it.
string
Restricts which field query matches against — username or name. When omitted, query matches either field.

Returns

Returns a PaginatedResponse<FollowRow>. Each entry is a FollowRow:
FollowRow[]
Array of following entries.
object
Pagination metadata: page, pageSize, totalPages, totalItems and hasMore.