useUnfollowByFollowId
Overview
TheuseUnfollowByFollowId hook allows the current logged-in user to unfollow another user using the specific follow relationship ID. This is useful when you have the follow ID from previous follow operations or when managing detailed follow relationships.
Usage Example
Advanced Usage with State Management
Usage with Confirmation Dialog
Parameters & Returns
Parameters
The hook returns a function that accepts an object with the following field:The ID of the follow relationship to remove
Returns
The function does not return a value but ensures the unfollow action is executed successfully on the server.Error Handling
The hook will throw errors in the following cases:- No project is specified
- No user is logged in
- No follow ID is provided
Use Cases
This hook is commonly used when:- Managing a list of users you’re following with specific follow IDs
- Implementing bulk unfollow operations
- Working with detailed follow relationship data
- Building admin interfaces for follow management
- Implementing undo functionality for recent follows
Related Hooks
useUnfollowUserByUserId- Unfollow using user ID instead of follow IDuseFetchFollowing- Get list of users you’re following (with follow IDs)useFollowUser- Follow a useruseFollowManager- Comprehensive follow state management

