Skip to Content
React Flow 13 is here! Read the announcement →
ReferenceHooks

useEdgesStore()

Source on GitHub 

import { useEdgesStore } from '@xyflow/react'; export function EdgeLookup() { const edgeLookup = useEdgesStore((state) => state.edgesLookup); return ( <div> <p>There are {Object.keys(edgeLookup).length} edges in the flow.</p> </div> ); }

Signature

Parameters:

This function does not accept any parameters.

Returns:
NameType
edgesEdge<Record<string, unknown>, string | undefined>[]
edgeLookupEdgeLookup<Edge<Record<string, unknown>, string | undefined>>
connectionLookupConnectionLookup