logoalt Hacker News

lbreakjaiyesterday at 2:36 AM2 repliesview on HN

> These are hard problems.

I fail to see how HTMX helps. I fail to see how SSR necessarily helps too. You could be serving a page for an order that's been cancelled by the time the user sees it.

> I put in some search criteria, maybe a check a few boxes. Refresh? All gone

You could see that 20 years ago too, unless you manually stored the state of the form somewhere. Again, what does it have to do with HTMX, or Rect, or SSR?


Replies

turtlebitsyesterday at 5:55 AM

HTMX helps enhance UX by not having to reload/render the entire page. IME it should be used sparingly.

For your name example, you could use hx-swap-oob to update multiple elements. However if you're submitting a form element, I would just re-render the page.

array_key_firstyesterday at 5:58 AM

> You could see that 20 years ago too, unless you manually stored the state of the form somewhere

See, that's my point - it's NOT manual, it's explicit. There's a difference. A form submission and page refresh is just that. It's very clear WHEN the sync happens and WHAT we are syncing.

With a SPA, you throw that all away and you have to do it yourself. And it's almost always done poorly and inconsistently.