Getting Started -> Building a Flow -> Adding an Edge: connect them with a curly edge
parent
eb4286d453
commit
2a52c5ae40
|
@ -3,6 +3,8 @@ import ReactFlow, { Background, Controls } from 'reactflow';
|
|||
// we have to import the React Flow styles for it to work
|
||||
import 'reactflow/dist/style.css';
|
||||
|
||||
const edges = [{ id: '1-2', source: '1', target: '2' }];
|
||||
|
||||
const nodes = [
|
||||
{
|
||||
id: '1',
|
||||
|
@ -20,7 +22,7 @@ const nodes = [
|
|||
const Flow = () => {
|
||||
return (
|
||||
<div style={{ height: '100vh' }}>
|
||||
<ReactFlow nodes={nodes}>
|
||||
<ReactFlow nodes={nodes} edges={edges}>
|
||||
<Background />
|
||||
<Controls />
|
||||
</ReactFlow>
|
||||
|
|
Loading…
Reference in New Issue