Node
Reactive substrate node that owns dependencies, wave handling, lifecycle, and subscribers.
Import
Section titled “Import”import { Node } from "@graphrefly/ts/core";Signature
Section titled “Signature”class NodeExample
Section titled “Example”import { node } from "@graphrefly/ts/core";
const source = node<number>([], null);source.subscribe((value) => console.log(value));source.down([["DATA", 1]]);Remarks
Section titled “Remarks”- Substrate primitive:
Nodeis graph-agnostic; usegraph().node,graph().state, orgraph().derivedwhen you want inspection and lifecycle ownership.
Source
Section titled “Source”packages/ts/src/node/node.ts