3 ms·
Someone got inspired by re-frame, I see :) I like the approach. Wondering if there's a way to get ever closer to hiccup (without having to resort to JSX) Also,
by beders 6y ago
Someone got inspired by re-frame, I see :)
I like the approach.
Wondering if there's a way to get ever closer to hiccup (without having to resort to JSX)
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.
- jorgebucaran 6y agoYep, there's a feature called Lazy (will be renamed to memo for the official release) that allows you to do just that! :)