Yes and no. That you can build a hierarchy with Element(attrs, children) where attrs may include callbacks is really decades old. Plain JS does it, react and angular do, and also a million template languages.
The question is, how can we not end up in a spaghetti ball? Your scripting style alone brings nothing to the table.
I would look up to something like Elm, which does answer OP's question.
The question is, how can we not end up in a spaghetti ball? Your scripting style alone brings nothing to the table.
I would look up to something like Elm, which does answer OP's question.