Skip to Content
You are viewing the v1 docs of Svelte Flow. You can find the latest version here.
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:

A reactive signal of the current edges

NameType
currentEdge[]
update(updateFn: (edges: Edge[]) => Edge[]) => void
set(edges: Edge[]) => void
Last updated on