2 ms·
With morphdom (or one day native DOM diffing), wouldn't HTMX fufill 80% of your wishlist? I personally find HTMX pairs well with web components for client comp
by megaman821 2y ago
With morphdom (or one day native DOM diffing), wouldn't HTMX fufill 80% of your wishlist?
I personally find HTMX pairs well with web components for client components since their lifecycle runs automatically when they get added to the DOM.
- pier25 2y agoWhat if the internal state of the web component has changed? Wouldn't an HTMX update stomp over it and reset the component to its initial state?
- megaman821 2y agoNot when using morphdom or the new moveBefore method. Although you would have to give your element a stable id.
- pier25 2y agoEven when using shadow DOM? What about internal JS state that isn't reflected in the DOM?
- megaman821 2y agoIf it is new to the DOM it will get added. If it is present in the DOM (based on id and other attributes when the id is not present) it will not get recreated. It may be left alone or it may have its attributes merged. There are a ton of edge cases though, which is why there is no native DOM diffing yet.
- pier25 2y agoThanks I need to look closer at this!