Re:Hyperapp – A tiny framework for building web interfaces
by jorgebucaran on Tuesday June 30, 2020 @01:53PM
(#23692792)
Yep, there's a feature called Lazy (will be renamed to memo for the official release) that allows you to do just that! :)
Also, letting the framework decide if a function inside the markup should be called or not gives opportunity for more optimizations that go beyond VDOM diffing. That would require an even more declarative approach.
i.e. [h1, {}, [MyComponent, {}]]
vs.
h("h1", {}, MyComponent({}))
If the framework figures out that MyComponent wasn't changed, it can re-use the VDOM nodes.