Closed JSteunou closed 5 years ago
I'll take a look, but we're talking about a lib that has like 3 tests. So, I'm not hopeful because I don't think that covers all the edge cases for DOM (re)rendering.
I follow you, just pointing out because it might bring some fresh idea :)
I've become involved in hyperapp's development.
The significant difference is that h()
returns a (non-standard) vnode
which is compared to other vnode
s on patch
. This makes the algorithm very efficient but incapable of operating in a context it did not generate. In this area, morphdom's approach is superior. Morphdom apps can add server-side rendering easily because it compares DOM nodes and they don't need to be in memory. Additionally, PRs and issues are working to resolve things like element reuse--something morphdom already does through id
s. My own PR repeats the issues we fixed in morphdom for "externally modified" elements.
Still lots to do over there but I'm learning quite a bit. I wouldn't call hyperapp ready for prime time just yet.
And what about https://github.com/WebReflection/hyperHTML? I like it's approach, no DOM or VDOM layer and no patch, just direct & simple update of existing node.
It's on my list 🤔
closing this for now...
Reading src code from hyperapp it seems easier & simpler to patch DOM nodes with object from hyperx quite directly without adding all the fuzz like vdom or some mock of native DOM method. hyperapp
h
function is dead simple and thepatch
quite light.Could morphdom benefits from this? Maybe join forces on the patch function?