Skip to main content

Overview

Returns a function that deletes a connection record by its connectionId. This works for both withdrawing a pending sent request and disconnecting an established connection. The current user must be authenticated. If you don’t have the connection ID, use useRemoveConnectionByUserId instead.

Usage Example

Parameters

The hook returns a function. That function accepts:
connectionId
string
required
The ID of the connection record to remove.

Returns

message
string
A confirmation message.