stage0
stage0 copied to clipboard
Collecting references
<h2>#test</h2>
<div>
<h2>Test</h2>
<h1>#count</h1>
<button #down>-</button>
<button #up>+</button>
</div>
Given the view snippet above, I tried to collect references using
const { count, down, up, board, test } = view.collect(view)
This failed and collection stopped at the first node, "H2". How do I collect all references in a view with different nodes? Thanks
Yeah, currently, stage0 doesn't support fragments, i.e. >2 root nodes in the template. I'll update you once implemented.
any update or even better pointer how to do support for template fragments ?
@Freak613 any update on this feat?
Not yet. The thing that I'm struggling with the most here is that introducing fragments will require proper reconciler support, because once inserted they will lose their context of the link with the siblings, and also will be removed from fragment. Without reconcile, it will leave the library in inconsistent state. And for reconciler, to have it working, the problem require hacks or additional structures for storing relations in the dom nodes or outside of it in the vdom. That's the pro of the vdom approach, that it can keep non-standart things in mind.