Skip to main content

Overview

Returns a function that follows a target user. The current user must be authenticated. Use useFollowManager if you need status tracking and toggle behavior; use this hook directly when you need fine-grained control.

Usage Example

Parameters

The hook returns a function. That function accepts:
string
required
The ID of the user to follow.

Returns

The function resolves to the follow row, a FollowRow: the new follow, or the existing one when you already follow the user — the same record either way, so a repeat is safe.
string
ID of the follow record. useUnfollowByFollowId takes it.
User
The followed user. See User data model.
string
ISO timestamp of when the follow was created.