API Reference
dynamicNode()
Construct a dynamicNode (R-dynamic-node / D35) — a node variant whose fn reads a subset of a fixed superset of deps per invocation via ctx.track(i). All declared deps participate in wave tracking; an unread dep's change re-runs the fn, which re-emits its current value as DATA (D49 removed equals-absorption — dedup is opt-in via distinctUntilChanged). Intra-graph only (D22).
Import
import { dynamicNode } from "@graphrefly/ts/core";
Signature
function dynamicNode(
deps: Node<unknown>[],
fn: NodeFn,
opts: NodeOptions<T> = {},
): Node<T>
Parameters
| Parameter | Type | Description |
|---|---|---|
deps | Node<unknown>[] | Declared dependency node or nodes. |
fn | NodeFn | Synchronous function invoked by the helper. |
opts | NodeOptions<T> | Options that configure the helper. |
Returns
A Node<T> value.
Example
import { dynamicNode } from "@graphrefly/ts/core";
Source
packages/ts/src/node/node.ts