Skip to Content
πŸ“£ We just released Svelte Flow 1.0 Alpha β€” try it out and give us your feedback!
ReferenceHooksuseNodes()

useNodes()

Source on GitHub 

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

#Returns
The current nodes store.
Last updated on