Overview
Returns a function that removes a connection with another user by theiruserId, without needing the connection record ID. The server determines the correct action (withdraw, disconnect, or decline) based on the current state. The current user must be authenticated.
This hook is used internally by
useConnectionManager’s removeConnectionSmart function.Usage Example
Parameters
The hook returns a function. That function accepts:The ID of the user to disconnect from. Cannot be the current user’s own ID.
Returns
The connection record ID, if applicable.
The action performed by the server.
A confirmation message.
Related
- useRemoveConnection — remove by connection ID
- useConnectionManager — wraps this as
removeConnectionSmart

