💡 This is the legacy site for v11. If you are looking for the latest docs, please visit React Flow
Reference
Connection

Connection

Source on GitHub (opens in a new tab)

The Connection type is the basic minimal description of an Edge between two nodes. The addEdge util can be used to upgrade a Connection to an Edge.

export type Connection = {
  source: string | null;
  target: string | null;
  sourceHandle: string | null;
  targetHandle: string | null;
};

Fields

#source
string | null
When not null, the id of the node this connection originates from.
#target
string | null
When not null, the id of the node this connection terminates at.
#sourceHandle
string | null
When not null, the id of the handle on the source node that this connection originates from.
#targetHandle
string | null
When not null, the id of the handle on the target node that this connection terminates at.