resonance-cascade / cache-component

DEPRECATED: Use nanocomponent. Will continue to operate as normal
https://github.com/choojs/nanocomponent
MIT License
16 stars 2 forks source link

Instance clobbering morph bug. #8

Closed bcomnes closed 7 years ago

bcomnes commented 7 years ago

If you have two instances of the same component, and try to morph one into the other, you lose the correct internal reference to the real DOM node inside of the component instance on _element. The work around here is to correctly ID using a unique instance ID.

Instance clobbering bug:

https://gist.github.com/bcomnes/fa4fa3a83807b4189356699c17207a0b

https://github.com/shama/on-load/issues/22

I think I solved it in an incoming PR.