3 ms·
This looks pretty awesome! Inspired by hyperscript I assume? https://github.com/hyperhype/hyperscript https://github.com/hyperhype/hyperscript Question: I was
by no_wizard 8y ago
This looks pretty awesome! Inspired by hyperscript I assume?
https://github.com/hyperhype/hyperscript https://github.com/hyperhype/hyperscript
Question: I was looking over the source and noted that you weren’t building your virtual dom with the document fragment API https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment https://developer.mozilla.org/en-US/docs/Web/API/DocumentFra...
Is there any particular reason why? I’m curious because it’s my general understanding that creating a document fragment and attaching your vnodes to that and then pushing to the dom is more efficient especially for diffing
- dlbucci 8y agoI have heard that as long as elements aren't actually in the DOM, they are as fast as fragments, so you can use document.createElement instead of fragments. No idea if that's true or not.
- starbuzz 8y agoHyperapp is based on virtual DOM and yes, I guess you could say it's inspired by Hyperscript in the same way as all virtual DOM based libraries or frameworks.