GraphReFlyTS

API Reference

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

import { StateNode } from "@graphrefly/ts/graph";

Signature

class StateNode

Example

import { graph } from "@graphrefly/ts/graph";

const count = graph().state(0);
count.set(1);

Source

packages/ts/src/graph/graph.ts