Skip to main content

useFetchFollowing

Overview

The useFetchFollowing hook fetches the list of users that the current logged-in user is following. 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 FollowingResponse object containing:

FollowingResponse

following
FollowingWithFollowInfo[]
Array of following information
pagination
PaginationInfo
Pagination metadata

FollowingWithFollowInfo

PaginationInfo

Error Handling

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