Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's because submitting a form interferes with all the other stuff running on the same page. E.g. after submission animations stop or disappear or skip a frame, annoying designers, etc. etc.


It's not always the right tool but in more cases than modern devs believe, it is.

I've built several web applications recently that don't use any modern JavaScript framework. You'd be surprised how quickly a page can fully reload and equally surprised at how okay of a UX it is to not always persist state.

Here's an example video of an app that does a mix of "state persistence" and "good ol' reload the page" approaches. https://withlattice.com/documentation#nav-create-application

1) Chat interface maintains state (but uses minimal JavaScript)

2) Application status requires a reload

Is this the absolute best UX? Possibly not, but users haven't said anything about it and it's such little code with almost zero dependencies.


Nobody complaining isn't necessarily a "good thing". Absence of evidence and all that.

I've found that it's only like 1/1000 that will.

And this thread (few days ago) about why it's hard to buy nice things touches it https://news.ycombinator.com/item?id=42430450

Many (most?) don't raise issues because they've been conditioned that things won't get fixed.

I'm with you that overdone JS isn't necessary; and we should also consider user-silence to issues to bloat, slowness and jank.


I agree with all of that. Perhaps what I meant to say was that these weren't the things users were complaining about.

I love a beautiful UI and experience. Listen to users and prioritize what helps them.


I don't think there is really anything in your "etc. etc." I have never heard from any real user a complaint about animations stopping mid-flow. I think people know how pages work, in that I think they expect clicking things to do something disruptive, altering, changing. It's only been the design astronauts that have argued these discontinuities are "confusing" to users.

If anything, sometimes I think they make the transition too smooth, to the point that it can be possible to miss it. Sharp changes are generally easy to notice.


> I don't think there is really anything in your "etc. etc."

"etc. etc." = anything with state, so this can be quite a lot actually ...


HTMX.

Or worst case scenario, fetch().

But honestly, forms are fine. Not all apps need beautiful animations.

It's better to have great UI, but it's not free.


HTTPS://gov.uk is amazing.


Forms are the real problem, not the tons of ads, auto playing videos, notification pop-ups, etc :-p


The sites that genuinely need a react frontend are fewer than the sites that use a react frontend. If you forgo react from the start, you have simplicity. At most, track your "state" in a session cookie + "rendering" on the backend. The good old days. I miss them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: