Skip to Content
Svelte Flow 2 is out! Read the announcement →
ReferenceHooks

useEdges()

Source on GitHub 

The useEdges hook returns the current edges array. The return value exposes a .current property to access the array.

<script lang="ts"> import { useEdges } from '@xyflow/svelte'; const edges = useEdges(); $inspect(edges.current); </script>

Signature

Parameters:

This function does not accept any parameters.

Returns:

The current edges inside a Svelte Flow context

NameType
currentEdge[]