Skip to content
PACKAGES

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 { dynamicNode } from "@graphrefly/ts/core";
function dynamicNode(
deps: Node<unknown>[],
fn: NodeFn,
opts: NodeOptions<T> = {},
): Node<T>
ParameterTypeDescription
depsNode<unknown>[]Declared dependency node or nodes.
fnNodeFnSynchronous function invoked by the helper.
optsNodeOptions<T>Options that configure the helper.

A Node<T> value.

import { dynamicNode } from "@graphrefly/ts/core";

packages/ts/src/node/node.ts