Skip to main content

Overview

Returns a function that unfollows a target user by their user ID. The current user must be authenticated. This is the simpler alternative to useUnfollowByFollowId when you don’t have the follow record ID.

Usage Example

Parameters

The hook returns a function. That function accepts:
userId
string
required
The ID of the user to unfollow. Cannot be the current user’s own ID.

Returns

The function returns Promise<void>.