StateNode
A state node (L4-Q1): a manual source whose .set(v) is node.down([[DATA, v]]) sugar.
Extends the substrate Node so it is usable as a dep AND carries the graph-layer .set.
Import
Section titled “Import”import { StateNode } from "@graphrefly/ts/graph";Signature
Section titled “Signature”class StateNodeExample
Section titled “Example”import { graph } from "@graphrefly/ts/graph";
const count = graph().state(0);count.set(1);Source
Section titled “Source”packages/ts/src/graph/graph.ts