2023-11-02
New "prevent connection cycles" example!

Hayleigh Thompson
Software Engineer
The “Prevent connection cycles” example shows how to use the
getOutgoers util to check if a new
connection would cause a cycle in the flow. Check it out here.
export const nodes = [
{
id: '1',
position: { x: 0, y: 9 },
data: { label: 'A' },
},
{
id: '2',
position: { x: 125, y: 125 },
data: { label: 'B' },
},
{
id: '3',
position: { x: 0, y: 250 },
data: { label: 'C' },
},
{
id: '4',
position: { x: -125, y: 125 },
data: { label: 'C' },
},
];
export const edges = [
{
id: 'e1-2',
source: '1',
target: '2',
},
];Get Pro examples, prioritized bug reports, 1:1 support from the maintainers, and more with React Flow Pro
Last updated on

