Overview
Returns a function that deletes a connection record by its connectionId. It withdraws a pending request the current user sent, or disconnects an accepted connection (either user can). 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:
The ID of the connection record to remove.
Returns
A Promise<void>. It resolves with no value once the connection is removed (the server answers 204 No Content), and rejects if the request fails.