Skip to main content

useFetchFollowingByUserId

Overview

The useFetchFollowingByUserId hook fetches the list of users that a specific user is following. This is a public endpoint that allows you to view any user’s following list with pagination support.

Usage Example

Advanced Usage with State Management

Parameters & Returns

Parameters

The hook returns a function that accepts an object with the following fields:
userId
string
required
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 user ID is provided
  • No project is specified

Notes

This is a public endpoint that doesn’t require user authentication, making it suitable for displaying any user’s following list in public-facing features.