Closed barneycarroll closed 3 years ago
Yes we would. Internal logic would be simplified.
Immediate ancestor components without discrete DOM artefacts bork the current mechanism because the render directive will cause their views to be re-computed, breaking the isolation contract.
☝ fixed in 6f1aeaf6.
The next blocker is a problem whereby Mithril attempts to patch values onto undefined
DOM nodes.
Why doesn't Mithril update the instance
vtree with DOM references during the localised render? I would expect this to have 'just worked'.
Is it an issue to do with Patchinko overwriting defined values in the target with undefined values in a patch? It shouldn't - we're not patching the instance
itself…
This is all obviated by Mobile
Because of nested fragments, components immediately returning components, etc, etc, Island needs to account for the fact that its nearest DOM-matched ancestor may be several vnodes away. We cater for this by creating a clone of the 'host' vnode entity and creating a hot path down to the recomputed Island view.
But seeing as we have to tunnel through any number of intervening vnodes anyway, would we be better off avoiding the intermediate
host
entity and simply rendering the patched structure to the original root?