Automatic DOM diffing #417
Replies: 4 comments 4 replies
-
Seems like htmx has that feature as an extension: https://htmx.org/extensions/morphdom-swap/ or https://htmx.org/extensions/alpine-morph/ |
Beta Was this translation helpful? Give feedback.
-
I find this very interesting, but needs some deep thinking what the impact would be. I know that the authors of htmx and Alpine.js/LiveWire are both working on new DOM morphing libraries because they ran into limitations with morphdom: https://github.com/bigskysoftware/idiomorph |
Beta Was this translation helpful? Give feedback.
-
Coming here after Turbo added morphing recently. One place, where I really like morphing is with form submissions, as the user submitting the form does not loose the input values and more importantly the focus from the input field. Would love to see something similar coming to Unpoly :) |
Beta Was this translation helpful? Give feedback.
-
just to add other POVs/ideas (without rating): today there are also liveview/livewire projects have already switched away from dom diff for some time. This is a small, but really advanced project with pretty interesting features and some really deep thoughts and considerations inside (also in other fields beside dom diff): ts-liveview of course, it's not directly comparable from the taken approach/goal side and not as battery included as unpoly, but the result is really stunning small and fast: It started with morphdom and moves on 2 years ago, see changelog of v2: |
Beta Was this translation helpful? Give feedback.
-
Hi. Sorry if this was discussed or implemented already, couldn't find it.
I'd love to see an automatic DOM diffing mechanism when targeting
up-main
. I mean something along the lines of what React does with its virtual DOM; or another solution like morphdom , which is used by Pheonix LiveWire and Django Sockpuppet.I think it would be extremely convenient, without worrying about placing your fragments, writing selectors etc. What are your thoughts?
Beta Was this translation helpful? Give feedback.
All reactions