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