useNodes
Source on GitHub (opens in a new tab)
This hook returns a store of the current nodes array. When you subscribe to this store, it will trigger whenever the nodes array changes. This happens when nodes are added, removed, or updated (dragged for example).
<script lang="ts">
import { useNodes } from '@xyflow/svelte';
const nodes = useNodes();
</script>
Signature
Name | Type |
---|---|
#Returns |
|
The current nodes store. |