News for hackers. Stuff that matters.
Re:We Fell Out of Love with Next.js and Back in Love with Ru... by throwaway7783 on Saturday May 03, 2025 @04:24PM (#43881955)
I have repeated this elsewhere. APIs for UI tend to diverge from APIs in general in practice.

For applications that are not highly interactive, you don't quite need a lot of tooling on the BE, and since need to have a BE anyway, a lot of standard tooling is already in there.

React style SPAs are useful in some cases, but most apps can live with HTMX style "SPA"s

Re:We Fell Out of Love with Next.js and Back in Love with Ru... by whatnow37373 on Saturday May 03, 2025 @05:16PM (#43882392)
Agreed. We started with one API to rule them all. What happened? Now we got two.. and now we have to communicate like this:

“So the backend gave this weird …”

“What backend?”

“The backend for the frontend…”

“So not the backend for the backend for the frontend?”

I jest, but only very slightly.

Re:We Fell Out of Love with Next.js and Back in Love with Ru... by throwaway7783 on Saturday May 03, 2025 @06:44PM (#43882981)
Exactly. And state is in two places now. It's like building two applications and trying to somehow keep them in sync.
Re:We Fell Out of Love with Next.js and Back in Love with Ru... by recursivedoubts on Saturday May 03, 2025 @06:41PM (#43882963)
Re:We Fell Out of Love with Next.js and Back in Love with Ru... by qudat on Sunday May 04, 2025 @09:02AM (#43886472)
> APIs for UI tend to diverge from APIs in general in practice.

I'm arguing to just use a single API, not creating one for UI, at least when you want things to be simple for multiple clients.