The shape is not far off: a declarative description, rebuilt when state changes, laid out by a box model. What goes away is everything underneath — no browser engine, no renderer process, no bundler, and a binary that is measured in hundreds of kilobytes rather than hundreds of megabytes.
| Electron | keal-view |
|---|---|
<span>Hi</span> | label("Hi") |
<button onclick=…> | button("Go", { -> … }) |
display: flex; flex-direction: column | column([…]) |
flex: 1 | .grows() |
<canvas> + 2D context | custom({ p -> p.canvas… }) |
a CSS variable theme | useTheme(darkTheme()) |
useState / a store | state(0) and .set(…) |
Style is set on the node, by chained modifiers, or comes from the one theme in force. Nothing inherits from an ancestor by name and nothing is overridden by a more specific selector somewhere else in the program. Whether that is a loss depends entirely on how large your stylesheet had become.
There is no main process talking to a renderer over IPC, and no serialising values to cross it. The interface and the work it does are the same program, and a handler is an ordinary call.
No DOM, no npm, no devtools, no accessibility tree, no complex-script text shaping, no images yet. Electron's weight buys an enormous amount and it is worth being honest about how much. What you get instead is a program you can read the whole of, and a window that costs nothing when nobody is touching it.