useHandleConnections()
Warning
useHandleConnections is deprecated in favor of the more capable
useNodeConnections.
This hook returns an array connections on a specific handle or handle type.
import { useHandleConnections } from '@xyflow/react';
export default function () {
const connections = useHandleConnections({ type: 'target', id: 'my-handle' });
return (
<div>There are currently {connections.length} incoming connections!</div>
);
}Signature
Last updated on