choojs / nanocomponent

🚃 - create performant HTML components
https://leaflet.choo.io/
MIT License
366 stars 30 forks source link

Match proxy node name with element #69

Closed tornqvist closed 6 years ago

tornqvist commented 6 years ago

As per discussion on irc, this would make sure that the proxy element is of the same node type that the rendered element. This would make it possible to morph a component onto itself, something that nanomorph won't allow if root node names differ. The motivation for this change is an experimental implementation of top level components in choo (see: https://github.com/yoshuawuyts/choo-component-preview)

var element = component.render()
morph(element, component.render())
bcomnes commented 6 years ago

🎉 nanocomponent@6.4.6 🎉