Bitburner Custom UI
I built a custom HUD for Bitburner that displays player stats, server targets, and hack, grow, and weaken activity. The game environment led me to experiment with a small renderer instead of using React DOM.
The renderer turns component-like objects into DOM nodes and supports text, attributes, styles, and event handlers. A diff helper updates text and attributes and replaces nodes when their type changes. This is a project experiment rather than a general-purpose React renderer.
The attribute-removal check in the example is:
oldAttrs.forEach((attr) => {
if (!newNode.hasAttribute(attr.name)) {
oldNode.removeAttribute(attr.name);
}
});
See the Bitburner scripts repository.
