• chris_pie 9 hours ago

    While this paradigm is promising, I see a problem with it. When you make a client-side change to the DOM, it can get overwritten by a subsequent incoming patch from the server.

    LiveView tries to be somewhat smart when patching the HTML by sending down only the dynamic parts. But on the client it generates the new HTML and morphs it into the DOM quite crudely (and inefficiently, but that's another can of worms).

    I've seen a workaround for this, by notifying the server of the change via an event, mirroring of sorts. But this is messy, and can require reimplementing the same conditional template logic on the backend.

    • chris_pie 9 hours ago

      Small addition because I didn't realise how LiveSvelte works. The backend pushes updated svelte component props to the client instead. You still often have to communicate the client-side changes to the server.

    • gkhartman 13 hours ago

      Having a stateful frontend and stateful backend sounds like it would be much harder to test. I'm sure that's fine for larger companies with many test engineers, but the extra work involved could bury smaller teams.