Hacker News new | ask | show | jobs
by pwmglenn 17 days ago
Remix originally pitched itself as solving the 'middle' layer between frontend and backend. Closing the gap. It never quite managed to do so imo.

Solid's solution here is beautiful. The server RPC and 'live' and 'broadcast' are seamless, and feel much more natural to use than liveview or htmx/datastar imo.

2 comments

`broadcast` is not mentioned in the release, so I went looking for it in the docs and was hit in the face with slop:

> Declares a live server function whose answer is the same for every viewer: on the client exactly live(fn) — the sharing is the server's.

> See Share one live answer across viewers for what is shared, what runs per caller, and the compile-time capture rule.

> live() runs one producer per connection, which is right when the answer can depend on who is asking.

Incredible, not even a Claudish linguistics expert could make sense of this. This is advanced slop
It's terse but I can make sense of this. I read it as broadcast() wrapping a single live() somehow, because invoking live() per a connection on the server would lead to viewers (clients? callers?) potentially seeing different streams.
Broadcast are async functions that will hydrate in the client after render.

Broadcast is one result to many Live is many results to many

I made the mistake of reading the signals code.

Nearly horfed right on my laptop. I won't be using that slop fest.

Remix (and React router, and the folks behind it) pitch a different thing each week, and they never manage to do it because they change their mind every Tuesday.