rednode API - v0.80.1
    Preparing search index...

    Interface InkMount

    A tree on a layer of the game's UI.

    interface InkMount {
        key: string;
        get(id: string): InkNode<InkProps> | undefined;
        unmount(): void;
        update(...children: InkNode<InkProps>[]): void;
    }
    Index
    key: string
    • Replaces the mount's tree with a new one built from data, sending only what changed: nodes of the same tag and shape keep their widgets and get the changed props; others are replaced.

      Parameters

      Returns void

      const draw = (s) => ink.column({ gap: 4 }, ...s.map((t) => ink.text(t, { style: "body" })));
      const board = ink.mount("hud", { anchor: "left", x: 80 }, draw(["Watson", "Kabuki"]));
      board.update(draw(["Watson", "Japantown"])); // one text changes