Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.replyke.com/llms.txt

Use this file to discover all available pages before exploring further.

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

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

function DisconnectButton({ connectionId }: { connectionId: string }) {
  const removeConnection = useRemoveConnection();

  return (
    <button onClick={() => removeConnection({ connectionId })}>
      Disconnect
    </button>
  );
}

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.