Hacker News new | ask | show | jobs
by dfabulich 1137 days ago
I've edited my post to clarify.

Multi-swap is possible, but it's not good, because the onus is on the developer to compute which components to swap, on the server side, but the state you need is usually on the client.

If you need multi-swap, you'll find it orders of magnitude easier to switch to a framework where the UI is a pure function of client-side state, like React or Svelte.

1 comments

You should be able to do this with events in HTMX also. So, you could do an update or create something and then in HTMX capture the event and reload the component when that happens.