Skip to content
PACKAGES

subscribeNodeValues()

Subscribe to DATA values from a Node. Protocol internals stay below the adapter boundary: DATA drives value listeners, ERROR/COMPLETE route to optional lifecycle callbacks.

import { subscribeNodeValues } from "@graphrefly/ts/adapters";
function subscribeNodeValues(
node: Node<T>,
run: (value: T | undefined) => void,
opts: SubscribeValuesOptions<T> = {},
): () => void
ParameterTypeDescription
nodeNode<T>Node to observe, adapt, or connect.
run(value: T | undefined) => voidrun value used by the helper.
optsSubscribeValuesOptions<T>Options that configure the helper.

A () => void value.

import { subscribeNodeValues } from "@graphrefly/ts/adapters";

packages/ts/src/adapters/store.ts