In my spare time I was reading about Astro (yet another Javascript framework) and I stumbled across something they call The Island Architecture [1] [2].
Sounds to me like rendering multiple live views in a page.
What do you think about the architecture and using live views to mark islands in pages?
Looks like it’s similar to LiveComponent. You can render as many LiveComponents as you want in a Liveview and it can encapsulate its own state and logic.
All that screenshotting is done by the view transition api. How things are animated is handled in css. The only requirement that’s there for JS is that it needs to update the DOM. Something as simple as pjax and alternatives can do that though even with a technically MPA/server rendered page.
Additionally, although the current implementation targets single page apps (SPAs), this feature will be expanded to allow for transitions between full page loads, which is currently impossible.
If LV provides a way to setup the view transition around its code of applying changes using morphdom, then yes. It likely requires some changes within LVs js itself, but I wouldn’t expect that to be an impossible task.
Is shouldn’t matter how the dom is updated. In the end anything LV does should boil down to “and now morphdom applies all its updates”. That’s the same no matter if it’s due to a patch, redirect, assign change, …. LV already has events emitted for navigation events. These are likely the points where view transitions are expected. The only issue is that you cannot “enable” view transitions across multiple event listeners. It needs a callback.