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

getConnectedEdges()

Source on GitHub (opens in a new tab)

Given an array of nodes that may be connected to one another and an array of all your edges, this util gives you an array of edges that connect any of the given nodes together.

import { getConnectedEdges } from 'reactflow';
 
const nodes = [];
const edges = [];
 
const connectedEdges = getConnectedEdges(nodes, edges);

Signature

#Params
#nodes
#edges
#Returns