Skip to Content
You are viewing the v12 docs of React Flow. You can find the latest version here.
ReferenceHooks

useNodeConnections()

Source on GitHub 

This hook returns an array of connections on a specific node, handle type (‘source’, ‘target’) or handle ID.

import { useNodeConnections } from '@xyflow/react'; export default function () { const connections = useNodeConnections({ handleType: 'target', handleId: 'my-handle', }); return ( <div>There are currently {connections.length} incoming connections!</div> ); }

Signature

Parameters:
NameTypeDefault
__0UseNodeConnectionsParams
Returns:
Last updated on