Skip to content

Function: useNodesData ​

â–¸ useNodesData<NodeType>(nodeId): ComputedRef<NodeData<NodeType> | null>

Composable for receiving data of one or multiple nodes

Type parameters ​

NameType
NodeTypeextends Node<any, any, string, NodeType> = GraphNode<any, any, string>

Parameters ​

NameTypeDescription
nodeIdMaybeRefOrGetter<string>The id (or ids) of the node to get the data from

Returns ​

ComputedRef<NodeData<NodeType> | null>

An array of data objects

â–¸ useNodesData<NodeType>(nodeIds): ComputedRef<NodeData<NodeType>[]>

Type parameters ​

NameType
NodeTypeextends Node<any, any, string, NodeType> = GraphNode<any, any, string>

Parameters ​

NameType
nodeIdsMaybeRefOrGetter<string[]>

Returns ​

ComputedRef<NodeData<NodeType>[]>

â–¸ useNodesData<NodeType>(nodeIds, guard): ComputedRef<NodeData<NodeType>[]>

Type parameters ​

NameType
NodeTypeextends Node<any, any, string, NodeType> = GraphNode<any, any, string>

Parameters ​

NameType
nodeIdsMaybeRefOrGetter<string[]>
guard(node: Node<any, any, string>) => node is NodeType

Returns ​

ComputedRef<NodeData<NodeType>[]>

Released under the MIT License.