Skip to main content

Overview

Returns a function that removes a follow by its followId. Use this when you have the follow ID available (e.g., from a followers list response). If you only have the user ID, use useUnfollowUserByUserId instead.

Usage Example

import { useUnfollowByFollowId } from "@replyke/react-js";

function RemoveFollowerButton({ followId }: { followId: string }) {
  const unfollowByFollowId = useUnfollowByFollowId();

  return (
    <button onClick={() => unfollowByFollowId({ followId })}>
      Remove
    </button>
  );
}

Parameters

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

Returns

The function returns Promise<void>.